Add missing Content-Type header for index

Serving the page without Content-Type seems to work but confuses the
view-source mode in Firefox.
This commit is contained in:
Vic Demuzere 2021-09-26 15:37:24 +02:00
parent 652eea694e
commit fefee9721d
No known key found for this signature in database
GPG Key ID: 5B9EA1616690CF94

View File

@ -113,6 +113,7 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Referrer-Policy", "no-referrer")
w.Header().Set("X-Frame-Options", "DENY")
w.Header().Set("X-Xss-Protection", "1; mode=block")