feat(security): #273 disable frame-ancestors
All checks were successful
Build Docker Image / Build-Docker-Image (push) Successful in 42s
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 45s

This commit was merged in pull request #274.
This commit is contained in:
2024-11-23 12:52:52 +01:00
parent 9ab78b6cc8
commit ae32bf7232

View File

@@ -7,7 +7,7 @@ func ContentSecurityPolicy(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// While this value can be overridden, it can't be moved to after the next.ServeHTTP call, // While this value can be overridden, it can't be moved to after the next.ServeHTTP call,
// because if the response writer get's closed, the headers can't be set anymore // because if the response writer get's closed, the headers can't be set anymore
w.Header().Set("Content-Security-Policy", "default-src 'self' https://umami.me-fit.eu") w.Header().Set("Content-Security-Policy", "default-src 'self' https://umami.me-fit.eu; frame-ancestors 'none'")
next.ServeHTTP(w, r) next.ServeHTTP(w, r)
}) })