File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,9 +12,21 @@ JWT_SECRET=
1212ADMIN_USERNAME=admin
1313ADMIN_PASSWORD=
1414
15+ # Login Security Configuration
16+ # Required: high-entropy salt used to hash login attempt identifiers (protects rate limiting)
17+ # Generate with: openssl rand -base64 48
18+ LOGIN_ATTEMPT_SALT=
19+
20+ # Cookie Security
21+ # Set to false if using CDN with SSL termination (BunnyCDN, Cloudflare, etc.)
22+ # AND your nginx config sets X-Forwarded-Proto to https
23+ # Default: true (cookies only sent over HTTPS)
24+ # AUTH_COOKIE_SECURE=false
25+
1526# Optional: CORS Configuration
1627# Comma-separated list of allowed frontend origins
1728# Default: http://localhost:8489
29+ # Production example: https://yourdomain.com
1830# FRONTEND_ORIGINS=http://localhost:8489,https://yourdomain.com
1931
2032# Optional: Rust log level
Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ DATABASE_URL=sqlite:./database.db
1212# For testing only: use a strong random string in production!
1313JWT_SECRET = your-super-secret-jwt-key-min-32-chars-change-me-in-production
1414
15+ # Cookie Security
16+ # Set to false if using CDN with SSL termination (BunnyCDN, Cloudflare, etc.)
17+ # AND your nginx config sets X-Forwarded-Proto to https
18+ # Default: true (cookies only sent over HTTPS)
19+ # AUTH_COOKIE_SECURE=true
20+
1521# Server Configuration
1622# Port on which the backend server will run
1723PORT = 8489
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ services:
2222 - FRONTEND_ORIGINS=${FRONTEND_ORIGINS:-http://localhost:8489}
2323 - ADMIN_USERNAME=${ADMIN_USERNAME:?ADMIN_USERNAME must be set in environment}
2424 - ADMIN_PASSWORD=${ADMIN_PASSWORD:?ADMIN_PASSWORD must be set in environment}
25+ - LOGIN_ATTEMPT_SALT=${LOGIN_ATTEMPT_SALT:?LOGIN_ATTEMPT_SALT must be set in environment}
26+ - AUTH_COOKIE_SECURE=${AUTH_COOKIE_SECURE:-true}
2527 volumes :
2628 - backend-data:/data
2729 networks :
Original file line number Diff line number Diff line change @@ -47,7 +47,9 @@ server {
4747 proxy_set_header Host $host;
4848 proxy_set_header X-Real-IP $remote_addr;
4949 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
50- proxy_set_header X-Forwarded-Proto $scheme;
50+ # WICHTIG: Bei SSL Termination durch CDN (BunnyCDN, Cloudflare, etc.)
51+ # muss dies auf 'https' gesetzt werden, damit Cookies richtig funktionieren
52+ proxy_set_header X-Forwarded-Proto https;
5153 proxy_set_header X-Forwarded-Host $host;
5254 proxy_set_header X-Forwarded-Port $server_port;
5355
You can’t perform that action at this time.
0 commit comments