diff --git a/cmd/godoc/handlers.go b/cmd/godoc/handlers.go index dda1bb87..600be685 100644 --- a/cmd/godoc/handlers.go +++ b/cmd/godoc/handlers.go @@ -54,6 +54,7 @@ func (h hostEnforcerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, r.URL.String(), http.StatusFound) return } + w.Header().Set("Strict-Transport-Security", "max-age=31536000; preload") h.h.ServeHTTP(w, r) }