Add Content-Security-Policy header

This commit is contained in:
Frédéric Guillot 2017-11-25 18:21:02 -08:00
parent bd663b43a0
commit 4560af165e

View file

@ -69,6 +69,7 @@ func (r *Response) commonHeaders() {
r.writer.Header().Set("X-XSS-Protection", "1; mode=block")
r.writer.Header().Set("X-Content-Type-Options", "nosniff")
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.