Always set content-type & nosniff

This commit is contained in:
Tim Allclair
2019-01-03 11:13:28 -08:00
parent 10979d4c75
commit ef6cba0b36
6 changed files with 10 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ func write(w http.ResponseWriter) error {
return fmt.Errorf("error marshaling json: %v", err)
}
w.Header().Set("Content-Type", "application/json")
w.Header().Set("X-Content-Type-Options", "nosniff")
_, err = w.Write(b)
return err
}