mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Close connection on automatic HTTP->HTTPS redirects
This commit is contained in:
parent
466efb7e67
commit
5d813a1b58
1 changed files with 1 additions and 0 deletions
|
@ -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 a new issue