mirror of
https://github.com/portainer/portainer.git
synced 2025-08-01 20:05:23 +02:00
fix(api): remove x-frame-options header (#2322)
This commit is contained in:
parent
bad95987ec
commit
6e8a10d72f
2 changed files with 0 additions and 2 deletions
|
@ -34,7 +34,6 @@ func (handler *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
||||||
}
|
}
|
||||||
|
|
||||||
w.Header().Add("X-Frame-Options", "DENY")
|
|
||||||
w.Header().Add("X-XSS-Protection", "1; mode=block")
|
w.Header().Add("X-XSS-Protection", "1; mode=block")
|
||||||
w.Header().Add("X-Content-Type-Options", "nosniff")
|
w.Header().Add("X-Content-Type-Options", "nosniff")
|
||||||
handler.Handler.ServeHTTP(w, r)
|
handler.Handler.ServeHTTP(w, r)
|
||||||
|
|
|
@ -114,7 +114,6 @@ func (bouncer *RequestBouncer) EndpointAccess(r *http.Request, endpoint *portain
|
||||||
// mwSecureHeaders provides secure headers middleware for handlers.
|
// mwSecureHeaders provides secure headers middleware for handlers.
|
||||||
func mwSecureHeaders(next http.Handler) http.Handler {
|
func mwSecureHeaders(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) {
|
||||||
w.Header().Add("X-Frame-Options", "DENY")
|
|
||||||
w.Header().Add("X-XSS-Protection", "1; mode=block")
|
w.Header().Add("X-XSS-Protection", "1; mode=block")
|
||||||
w.Header().Add("X-Content-Type-Options", "nosniff")
|
w.Header().Add("X-Content-Type-Options", "nosniff")
|
||||||
next.ServeHTTP(w, r)
|
next.ServeHTTP(w, r)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue