http/response: get rid of the X-XSS-Protection header
It's useless at best, dangerous at worst, and shouldn't be used anymore anywhere. See the following resources for details: - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection - https://chromestatus.com/feature/5021976655560704 - https://bugzilla.mozilla.org/show_bug.cgi?id=528661 - https://blogs.windows.com/windows-insider/2018/07/25/announcing-windows-10-insider-preview-build-17723-and-build-18204/
This commit is contained in:
parent
e3b3c40c28
commit
93c9d43497
2 changed files with 0 additions and 2 deletions
|
@ -96,7 +96,6 @@ func (b *Builder) Write() {
|
|||
}
|
||||
|
||||
func (b *Builder) writeHeaders() {
|
||||
b.headers["X-XSS-Protection"] = "1; mode=block"
|
||||
b.headers["X-Content-Type-Options"] = "nosniff"
|
||||
b.headers["X-Frame-Options"] = "DENY"
|
||||
b.headers["Referrer-Policy"] = "no-referrer"
|
||||
|
|
|
@ -28,7 +28,6 @@ func TestResponseHasCommonHeaders(t *testing.T) {
|
|||
resp := w.Result()
|
||||
|
||||
headers := map[string]string{
|
||||
"X-XSS-Protection": "1; mode=block",
|
||||
"X-Content-Type-Options": "nosniff",
|
||||
"X-Frame-Options": "DENY",
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue