Fix some port stuff for developer mode

This commit is contained in:
Kelvin Ly (on the cloud) 2019-07-19 03:40:45 +00:00
parent 16e147dca2
commit 3d7ff03609
1 changed files with 2 additions and 2 deletions

View File

@ -319,7 +319,7 @@ func startServer(srv *http.Server) {
serveMux := http.NewServeMux() serveMux := http.NewServeMux()
if !*devmode { if !*devmode {
serveMux.HandleFunc("dev."+DOMAIN_NAME+"/", forwardRequest(8444, "https")) serveMux.HandleFunc("dev."+DOMAIN_NAME+"/", forwardRequest(8081, "http"))
} }
serveMux.HandleFunc("/", rootHandler) serveMux.HandleFunc("/", rootHandler)
//serveMux.Handle("/certbot/", http.StripPrefix("/certbot/", http.FileServer(http.Dir("./certbot-tmp")))) //serveMux.Handle("/certbot/", http.StripPrefix("/certbot/", http.FileServer(http.Dir("./certbot-tmp"))))
@ -379,7 +379,7 @@ func startServer(srv *http.Server) {
} }
if *devmode { if *devmode {
srv.Addr = ":8444" srv.Addr = ":8081"
srv.Handler = serveMux srv.Handler = serveMux
} else { } else {
srv.Addr = ":8443" srv.Addr = ":8443"