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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user