diff --git a/cmd/routed/main.go b/cmd/routed/main.go index be3b2ef..f393d91 100644 --- a/cmd/routed/main.go +++ b/cmd/routed/main.go @@ -57,6 +57,9 @@ func main() { Handler: middleware.Trace(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { r.URL.Host = r.Host r.URL.Scheme = "https" + + ln.Log(r.Context(), ln.Action("redirecting insecure HTTP to HTTPS")) + http.Redirect(w, r, r.URL.String(), http.StatusPermanentRedirect) })), Addr: scfg.WebAddr,