feat(web): Add CSP header

This commit is contained in:
emrah
2026-01-15 19:34:19 +03:00
committed by Saúl Ibarra Corretgé
parent e9af879e62
commit 4509144221
2 changed files with 4 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ services:
- COLIBRI_WEBSOCKET_REGEX
- CONFCODE_URL
- CORS_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN
- CSP_HEADER
- DEFAULT_LANGUAGE
- DEPLOYMENTINFO_ENVIRONMENT
- DEPLOYMENTINFO_ENVIRONMENT_TYPE

View File

@@ -28,6 +28,9 @@ error_page 404 /static/404.html;
# Security headers
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
{{ if .Env.CSP_HEADER }}
add_header Content-Security-Policy "{{ .Env.CSP_HEADER }}" always;
{{ end }}
set $prefix "";