Created
February 2, 2019 18:35
-
-
Save mitjafelicijan/9de9be557f928be80fc8c9673ec22cb8 to your computer and use it in GitHub Desktop.
Python Bottlepy redirect with caching fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python ➜ bottlepy web micro-framework | |
response = bottle.HTTPResponse(status=302) | |
response.set_header("Cache-Control", "no-store, no-cache, must-revalidate") | |
response.set_header("Expires", "Thu, 01 Jan 1970 00:00:00 GMT") | |
response.set_header("Location", url) | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment