Commit bf166b75 authored by jvoisin's avatar jvoisin

Improve a bit the cookie's hardening

- Samesite for session cookies as well as the remember me ones
- Httponly
parent 189243a9
...@@ -56,6 +56,12 @@ mimetypes.add_type('application/ogg', '.ogg') ...@@ -56,6 +56,12 @@ mimetypes.add_type('application/ogg', '.ogg')
mimetypes.add_type('application/ogg', '.oga') mimetypes.add_type('application/ogg', '.oga')
app = Flask(__name__) app = Flask(__name__)
app.config.update(
SESSION_COOKIE_HTTPONLY=True,
SESSION_COOKIE_SAMESITE='Lax',
REMEMBER_COOKIE_SAMESITE='Lax',
)
lm = LoginManager() lm = LoginManager()
lm.login_view = 'web.login' lm.login_view = 'web.login'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment