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

@@ -273,6 +273,8 @@ func (h *debugHTTPHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "text/vnd.graphviz")
w.Header().Set("X-Content-Type-Options", "nosniff")
w.Write(data)
w.WriteHeader(http.StatusOK)
}