Created
July 27, 2013 04:02
-
-
Save lepture/6093661 to your computer and use it in GitHub Desktop.
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
| from flask import Flask as _Flask | |
| from flask.sessions import SecureCookieSessionInterface | |
| class _SecureCookieSessionInterface(SecureCookieSessionInterface): | |
| def save_session(self, app, session, response): | |
| if not session.modified: | |
| return | |
| super(_SecureCookieSessionInterface, self).save_session( | |
| app, session, response | |
| ) | |
| class Flask(_Flask): | |
| session_interface = _SecureCookieSessionInterface() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment