Remove quotes for XSS Protection Header (#5992)

This commit is contained in:
Arjun Mishra 2018-05-30 02:29:27 -07:00 committed by Nitish Tiwari
parent a50cc7e937
commit dd0db526d9

View File

@ -661,7 +661,7 @@ func addSecurityHeaders(h http.Handler) http.Handler {
func (s securityHeaderHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
header := w.Header()
header.Set("X-XSS-Protection", "\"1; mode=block\"") // Prevents against XSS attacks
header.Set("X-XSS-Protection", "1; mode=block") // Prevents against XSS attacks
header.Set("Content-Security-Policy", "block-all-mixed-content") // prevent mixed (HTTP / HTTPS content)
s.handler.ServeHTTP(w, r)
}