Skip to content

Commit 98d3c60

Browse files
committed
feat(serverHandler/json): add extra header
1 parent 4b60c32 commit 98d3c60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/serverHandler/json.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ func getJsonData(data *responseData) *jsonResponseData {
7878
func (h *aliasHandler) json(w http.ResponseWriter, r *http.Request, data *responseData) {
7979
header := w.Header()
8080
header.Set("Vary", h.vary)
81+
header.Set("X-Content-Type-Options", "nosniff")
8182
header.Set("Content-Type", "application/json; charset=utf-8")
8283
if lacksHeader(header, "Cache-Control") {
8384
header.Set("Cache-Control", "public, max-age=0")

0 commit comments

Comments
 (0)