header_whitelist → allowed_headers
This commit is contained in:
parent
98bee9b1cd
commit
85b716c11c
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue