fix(csp): update the Content-Security-Policy header BE-12228 (#1202)

release/2.33
andres-portainer 2025-09-15 10:47:57 -03:00 committed by GitHub
parent f97adc94ad
commit e9d31b3b7b
1 changed files with 1 additions and 1 deletions

View File

@ -535,7 +535,7 @@ func MWSecureHeaders(next http.Handler, hsts, csp bool) http.Handler {
}
if csp {
w.Header().Set("Content-Security-Policy", "script-src 'self' cdn.matomo.cloud js.hsforms.net www.google.com; object-src 'none'; frame-ancestors 'none';")
w.Header().Set("Content-Security-Policy", "script-src 'self' cdn.matomo.cloud js.hsforms.net https://www.google.com/recaptcha/, https://www.gstatic.com/recaptcha/; object-src 'none'; frame-ancestors 'none'; frame-src https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/")
}
w.Header().Set("X-Content-Type-Options", "nosniff")