Skip to content
Snippets Groups Projects
Commit 4560af16 authored by Frédéric Guillot's avatar Frédéric Guillot
Browse files

Add Content-Security-Policy header

parent bd663b43
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,7 @@ func (r *Response) commonHeaders() { ...@@ -69,6 +69,7 @@ func (r *Response) commonHeaders() {
r.writer.Header().Set("X-XSS-Protection", "1; mode=block") r.writer.Header().Set("X-XSS-Protection", "1; mode=block")
r.writer.Header().Set("X-Content-Type-Options", "nosniff") r.writer.Header().Set("X-Content-Type-Options", "nosniff")
r.writer.Header().Set("X-Frame-Options", "DENY") r.writer.Header().Set("X-Frame-Options", "DENY")
r.writer.Header().Set("Content-Security-Policy", "default-src 'self'; img-src *; media-src *; frame-src *")
} }
// NewResponse returns a new Response. // NewResponse returns a new Response.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment