|
|
@ -5,9 +5,8 @@ import ( |
|
|
|
) |
|
|
|
|
|
|
|
const ( |
|
|
|
cspHeader = "Content-Security-Policy" |
|
|
|
frameOptionsHeader = "X-Frame-Options" |
|
|
|
contentTypeOptionsHeader = "X-Content-Type-Options" |
|
|
|
cspHeader = "Content-Security-Policy" |
|
|
|
frameOptionsHeader = "X-Frame-Options" |
|
|
|
) |
|
|
|
|
|
|
|
type csp struct { |
|
|
@ -27,7 +26,6 @@ func (c csp) ServeHTTP(w http.ResponseWriter, r *http.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
w.Header().Set(frameOptionsHeader, c.opts.frame) |
|
|
|
w.Header().Set(contentTypeOptionsHeader, "nosniff") |
|
|
|
|
|
|
|
c.h.ServeHTTP(w, r) |
|
|
|
} |
|
|
|