2
0
mirror of https://github.com/codl/forget synced 2024-12-25 14:42:41 +01:00

header_whitelist → allowed_headers

This commit is contained in:
codl 2021-05-14 18:47:46 +02:00 committed by GitHub
parent 98bee9b1cd
commit 85b716c11c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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),