Ensure downstream proxies don't cache enforce_https()'s redirect

This commit is contained in:
Jordan Milne
2014-08-08 16:16:59 -03:00
committed by Neil Williams
parent 971f24f1c1
commit 54957ee639

View File

@@ -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