diff --git a/cmd/godoc/handlers.go b/cmd/godoc/handlers.go index 137709bd2..a8447b371 100644 --- a/cmd/godoc/handlers.go +++ b/cmd/godoc/handlers.go @@ -55,7 +55,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") + w.Header().Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload") h.h.ServeHTTP(w, r) } diff --git a/cmd/tip/tip.go b/cmd/tip/tip.go index 91032dc20..35b06ec5b 100644 --- a/cmd/tip/tip.go +++ b/cmd/tip/tip.go @@ -408,7 +408,7 @@ func (h httpsOnlyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.Header.Get("X-Appengine-Https") == "on" || r.Header.Get("X-Forwarded-Proto") == "https" || (!isProxiedReq(r) && r.TLS != nil) { // Only set this header when we're actually in production. - w.Header().Set("Strict-Transport-Security", "max-age=31536000; preload") + w.Header().Set("Strict-Transport-Security", "max-age=31536000; includeSubDomains; preload") } h.h.ServeHTTP(w, r) }