cmd/routed: only serve sites over https
This commit is contained in:
parent
9b0c00cefd
commit
61611ba7f0
|
@ -54,7 +54,10 @@ func main() {
|
|||
defer l.Close()
|
||||
|
||||
hs := &http.Server{
|
||||
Handler: middleware.Trace(s),
|
||||
Handler: middleware.Trace(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
r.URL.Scheme = "https"
|
||||
http.Redirect(w, r, r.URL.String(), http.StatusPermanentRedirect)
|
||||
})),
|
||||
Addr: scfg.WebAddr,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue