Backend refactoring updates

- Update Docker compose debug configuration
- Update backend documentation
- Update tasks documentation
- Update backend config module

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-04-26 12:05:01 +02:00
parent 29daaa9906
commit f55c317f87
4 changed files with 22 additions and 36 deletions

View File

@@ -506,6 +506,22 @@ class Settings(BaseSettings):
model_config = {"env_prefix": "BANGUI_", "env_file": ".env"}
```
### Session Cookie Security
The `session_cookie_secure` configuration controls the `Secure` flag on the session cookie. This flag prevents browsers from sending the session cookie over unencrypted HTTP.
**Default:** `true` — Production deployments are secure by default. Cookies are only sent over HTTPS.
**Local Development:** Set `BANGUI_SESSION_COOKIE_SECURE=false` in your compose file or `.env` to allow cookies over HTTP (required for `localhost:8000`).
```yaml
# Docker/compose.debug.yml
environment:
BANGUI_SESSION_COOKIE_SECURE: "false" # Allow HTTP during local development
```
**Important:** If `Secure=true` is set, browsers will reject the session cookie when the backend is served over HTTP. Ensure your nginx/reverse proxy terminates TLS and passes `X-Forwarded-Proto: https` so FastAPI knows the connection is secure.
---
## 13. Git & Workflow