Set Secure Flag On Cookie When Served As HTTPS
See also: https://flask.palletsprojects.com/en/1.1.x/security/#set-cookie-options
This commit is contained in:
3
app.py
3
app.py
@@ -93,6 +93,9 @@ app.register_blueprint(blueprints.indieauth.blueprint)
|
||||
app.register_blueprint(blueprints.tasks.blueprint)
|
||||
app.register_blueprint(blueprints.well_known.blueprint)
|
||||
app.config.update(WTF_CSRF_CHECK_DEFAULT=False)
|
||||
|
||||
app.config.update(SESSION_COOKIE_SECURE=True if config.SCHEME == "https" else False)
|
||||
|
||||
csrf.init_app(app)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
Reference in New Issue
Block a user