aboutsummaryrefslogtreecommitdiff
path: root/newspipe/web/lib/view_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'newspipe/web/lib/view_utils.py')
-rw-r--r--newspipe/web/lib/view_utils.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/newspipe/web/lib/view_utils.py b/newspipe/web/lib/view_utils.py
index 1d8c6aed..218ebb4c 100644
--- a/newspipe/web/lib/view_utils.py
+++ b/newspipe/web/lib/view_utils.py
@@ -15,12 +15,14 @@ def etag_match(func):
headers = {}
else:
return response
- if request.headers.get('if-none-match') == etag:
+ if request.headers.get("if-none-match") == etag:
response = Response(status=304)
- response.headers['Cache-Control'] \
- = headers.get('Cache-Control', 'pragma: no-cache')
+ response.headers["Cache-Control"] = headers.get(
+ "Cache-Control", "pragma: no-cache"
+ )
elif not isinstance(response, Response):
response = make_response(response)
- response.headers['etag'] = etag
+ response.headers["etag"] = etag
return response
+
return wrapper
bgstack15