Add security headers to Caddyfile and update file server configuration
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m3s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 8m36s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m56s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m53s
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Successful in 7m3s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 8m36s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Successful in 1m56s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m53s
This commit is contained in:
@@ -17,13 +17,20 @@
|
|||||||
format json
|
format json
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Sicherheits-Header für SharedArrayBuffer (benötigt für SQLite WASM)
|
||||||
|
header {
|
||||||
|
# Erlaubt das Laden von Cross-Origin-Ressourcen, aber nur wenn diese es explizit erlauben
|
||||||
|
Cross-Origin-Embedder-Policy "require-corp"
|
||||||
|
# Isoliert den Kontext, um Sicherheitsrisiken zu minimieren
|
||||||
|
Cross-Origin-Opener-Policy "same-origin"
|
||||||
|
}
|
||||||
|
|
||||||
# Komprimierung
|
# Komprimierung
|
||||||
encode gzip zstd
|
encode gzip zstd
|
||||||
|
|
||||||
# Caddy-Template-Engine: ersetzt {{.Env.VAR}} in index.html UND config.json
|
# Caddy-Template-Engine: ersetzt {{.Env.VAR}} in index.html UND config.json
|
||||||
templates {
|
templates
|
||||||
mime application/json
|
file_server
|
||||||
}
|
|
||||||
|
|
||||||
# API-Proxy (höchste Priorität – vor dem SPA-Fallback)
|
# API-Proxy (höchste Priorität – vor dem SPA-Fallback)
|
||||||
handle /api/* {
|
handle /api/* {
|
||||||
@@ -38,6 +45,5 @@
|
|||||||
# SPA-Fallback: existierende Dateien direkt ausliefern, sonst index.html
|
# SPA-Fallback: existierende Dateien direkt ausliefern, sonst index.html
|
||||||
handle {
|
handle {
|
||||||
try_files {path} /index.html
|
try_files {path} /index.html
|
||||||
file_server
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user