Merge pull request #82 from hiromi-mi/make_session_cookie_secure
Set Secure Flag On Cookie When Served As HTTPS
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.tasks.blueprint)
|
||||||
app.register_blueprint(blueprints.well_known.blueprint)
|
app.register_blueprint(blueprints.well_known.blueprint)
|
||||||
app.config.update(WTF_CSRF_CHECK_DEFAULT=False)
|
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)
|
csrf.init_app(app)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
Reference in New Issue
Block a user