mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Ensure downstream proxies don't cache enforce_https()'s redirect
This commit is contained in:
committed by
Neil Williams
parent
971f24f1c1
commit
54957ee639
@@ -786,7 +786,8 @@ def enforce_https():
|
||||
redirect_url = hsts_modify_redirect(dest)
|
||||
|
||||
if redirect_url:
|
||||
abort(307, location=redirect_url)
|
||||
headers = {"Cache-Control": "no-cache", "Pragma": "no-cache"}
|
||||
abort(307, location=redirect_url, headers=headers)
|
||||
|
||||
|
||||
# Cookies that might need the secure flag toggled
|
||||
|
||||
Reference in New Issue
Block a user