cmd/routed: redirect better

This commit is contained in:
Cadey Ratio 2017-10-01 11:01:18 -07:00
parent 61611ba7f0
commit 4396e6822e
No known key found for this signature in database
GPG Key ID: D607EE27C2E7F89A
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ func main() {
hs := &http.Server{
Handler: middleware.Trace(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
r.URL.Host = r.Host
r.URL.Scheme = "https"
http.Redirect(w, r, r.URL.String(), http.StatusPermanentRedirect)
})),