mirror of
https://github.com/caddyserver/caddy.git
synced 2026-11-12 20:03:34 +00:00
Set listenHost to localhost if empty; fixes test on Windows
This commit is contained in:
1 file changed
+4
@@ -29,6 +29,10 @@ func HTTPChallengeHandler(w http.ResponseWriter, r *http.Request, listenHost, al
|
||||
scheme = "https"
|
||||
}
|
||||
|
||||
if listenHost == "" {
|
||||
listenHost = "localhost"
|
||||
}
|
||||
|
||||
upstream, err := url.Parse(fmt.Sprintf("%s://%s:%s", scheme, listenHost, altPort))
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
Reference in new issue
Block a user