From 85b716c11cf6d9072cbca00afbd88f823d05cbf1 Mon Sep 17 00:00:00 2001 From: codl Date: Fri, 14 May 2021 18:47:46 +0200 Subject: [PATCH] =?UTF-8?q?header=5Fwhitelist=20=E2=86=92=20allowed=5Fhead?= =?UTF-8?q?ers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libforget/img_proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libforget/img_proxy.py b/libforget/img_proxy.py index b34a11b..ca93bf0 100644 --- a/libforget/img_proxy.py +++ b/libforget/img_proxy.py @@ -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),