feat: Session-Cookie secure-Flag per FB_SESSION_COOKIE_SECURE

This commit is contained in:
2026-07-21 07:06:42 +02:00
parent fa2d32aa8f
commit 52f527a375
2 changed files with 23 additions and 1 deletions

View File

@@ -49,7 +49,8 @@ def login(username: str = Form(...), password: str = Form(...)):
return HTMLResponse("Login fehlgeschlagen", status_code=401)
resp = RedirectResponse("/", status_code=303)
resp.set_cookie(auth.COOKIE, auth.make_session_token(), httponly=True,
max_age=auth.MAX_AGE, samesite="lax")
max_age=auth.MAX_AGE, samesite="lax",
secure=s.session_cookie_secure)
return resp