1
0
mirror of https://github.com/nxshock/gonx.git synced 2024-11-27 17:11:01 +05:00

Удаление неактуального комментария

This commit is contained in:
nxshock 2023-12-29 09:42:25 +05:00
parent 4c779d0954
commit 9447891759

View File

@ -66,7 +66,7 @@ func main() {
smux := http.NewServeMux() smux := http.NewServeMux()
smux.Handle(defaultAcmeChallengePath, http.StripPrefix(defaultAcmeChallengePath, http.FileServer(http.Dir(config.AcmeChallengePath)))) smux.Handle(defaultAcmeChallengePath, http.StripPrefix(defaultAcmeChallengePath, http.FileServer(http.Dir(config.AcmeChallengePath))))
smux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { smux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "https://"+r.Host+r.RequestURI, http.StatusMovedPermanently) // TODO: заполнить URL переадресации http.Redirect(w, r, "https://"+r.Host+r.RequestURI, http.StatusMovedPermanently)
}) })
httpServer := http.Server{Handler: smux} httpServer := http.Server{Handler: smux}
httpServer.Addr = config.HttpListenAddr httpServer.Addr = config.HttpListenAddr