mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-04 11:14:42 +08:00
Close connection on automatic HTTP->HTTPS redirects
This commit is contained in:
@ -149,6 +149,7 @@ func redirPlaintextHost(cfg *SiteConfig) *SiteConfig {
|
||||
toURL += ":" + redirPort
|
||||
}
|
||||
toURL += r.URL.RequestURI()
|
||||
w.Header().Set("Connection", "close")
|
||||
http.Redirect(w, r, toURL, http.StatusMovedPermanently)
|
||||
return 0, nil
|
||||
})
|
||||
|
Reference in New Issue
Block a user