Close connection on automatic HTTP->HTTPS redirects

This commit is contained in:
Matthew Holt 2017-01-01 10:27:53 -07:00
parent 466efb7e67
commit 5d813a1b58
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5

View File

@ -149,6 +149,7 @@ func redirPlaintextHost(cfg *SiteConfig) *SiteConfig {
toURL += ":" + redirPort toURL += ":" + redirPort
} }
toURL += r.URL.RequestURI() toURL += r.URL.RequestURI()
w.Header().Set("Connection", "close")
http.Redirect(w, r, toURL, http.StatusMovedPermanently) http.Redirect(w, r, toURL, http.StatusMovedPermanently)
return 0, nil return 0, nil
}) })