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
1 changed files with 2 additions and 2 deletions

View File

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