From 4396e6822e764bab9b26c79dc273ec6174e46831 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sun, 1 Oct 2017 11:01:18 -0700 Subject: [PATCH] cmd/routed: redirect better --- cmd/routed/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/routed/main.go b/cmd/routed/main.go index 8b5bde1..be3b2ef 100644 --- a/cmd/routed/main.go +++ b/cmd/routed/main.go @@ -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) })),