Make cookies more secure

This commit is contained in:
redfast00 2019-09-11 16:43:42 +02:00
parent d75732fdcf
commit b12bcc882d
No known key found for this signature in database
GPG key ID: 5946E0E34FD0553C

View file

@ -94,6 +94,15 @@ def register_plugins(app: Flask, debug: bool) -> Manager:
# Load the flask debug toolbar
toolbar = DebugToolbarExtension(app)
# Make cookies more secure
app.config.update(
SESSION_COOKIE_HTTPONLY=True,
SESSION_COOKIE_SAMESITE='Lax',
)
if not app.debug:
app.config.update(SESSION_COOKIE_SECURE=True)
return manager