fix: CSP inline-script hash + SESSION_SECURE=false für HTTP-Betrieb
- CSP: SHA-256-Hash für Theme-Detection Inline-Script hinzugefügt - docker-compose: SESSION_SECURE=false, damit HSTS und upgrade-insecure-requests bei direktem HTTP-Zugriff deaktiviert sind Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,8 @@ services:
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DB_PATH=/data/oikos.db
|
||||
# Auf false setzen wenn kein HTTPS/Reverse-Proxy (direkter HTTP-Zugriff)
|
||||
- SESSION_SECURE=false
|
||||
healthcheck:
|
||||
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', r => process.exit(r.statusCode === 200 ? 0 : 1))"]
|
||||
interval: 30s
|
||||
|
||||
@@ -37,6 +37,8 @@ app.use(helmet({
|
||||
defaultSrc: ["'self'"],
|
||||
scriptSrc: [
|
||||
"'self'",
|
||||
// Inline-Script: Theme-Detection (Flash-Prevention)
|
||||
"'sha256-vqqBNo1oitnzIntwkG83UaYqkUAnV/oZ/RkvcA41Y6A='",
|
||||
// Alpine.js CDN (optional, falls verwendet)
|
||||
'https://cdn.jsdelivr.net',
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user