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:
parent
8df0ddb03a
commit
0c9fb36c91
1 changed files with 3 additions and 0 deletions
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__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue