Merge pull request #460 from codl/better-words

better terminology
This commit is contained in:
codl 2021-05-14 20:29:12 +02:00 committed by GitHub
commit f3e68e7fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -65,7 +65,7 @@ class ImgProxyCache(object):
if(resp.status_code != 200):
return
header_whitelist = [
allowed_headers = [
'content-type',
'cache-control',
'etag',
@ -81,7 +81,7 @@ class ImgProxyCache(object):
if match:
expire = max(self.expire, int(match.group(1)))
for key in header_whitelist:
for key in allowed_headers:
if key in resp.headers:
headers[key] = resp.headers[key]
self.redis.set(self.key('headers', url), pickle.dumps(headers, -1),

View File

@ -195,11 +195,11 @@ def delete(post):
raise TemporaryError(e)
def suggested_instances(limit=5, min_popularity=5, blacklist=tuple()):
def suggested_instances(limit=5, min_popularity=5, blocklist=tuple()):
return tuple((ins.instance for ins in (
MastodonInstance.query
.filter(MastodonInstance.popularity > min_popularity)
.filter(~MastodonInstance.instance.in_(blacklist))
.filter(~MastodonInstance.instance.in_(blocklist))
.order_by(db.desc(MastodonInstance.popularity),
MastodonInstance.instance)
.limit(limit).all())))