mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-24 04:58:31 -05:00
feat: add CSP and other security related headers in the oCIS proxy service (#8777)
* feat: add CSP and other security related headers in the oCIS proxy service * fix: consolidate security related headers - drop middleware.Secure * fix: use github.com/DeepDiver1975/secure * fix: acceptance tests * feat: support env var replacements in csp.yaml
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
// SilentRefresh allows the oidc client lib to silently refresh the token in an iframe
|
||||
func SilentRefresh(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
|
||||
w.Header().Set("Content-Security-Policy", "frame-ancestors 'self'")
|
||||
next.ServeHTTP(w, r)
|
||||
})
|
||||
|
||||
@@ -84,7 +84,6 @@ func Server(opts ...Option) (http.Service, error) {
|
||||
chimiddleware.RealIP,
|
||||
chimiddleware.RequestID,
|
||||
middleware.NoCache,
|
||||
middleware.Secure,
|
||||
webmid.SilentRefresh,
|
||||
middleware.Version(
|
||||
"web",
|
||||
|
||||
Reference in New Issue
Block a user