cmd/routed: log http redirects
This commit is contained in:
parent
4396e6822e
commit
26a32350c9
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue