mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-29 12:16:16 +08:00
Close connection on automatic HTTP->HTTPS redirects
This commit is contained in:
parent
466efb7e67
commit
5d813a1b58
|
@ -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
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user