mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-24 09:37:03 +01:00
letsencrypt: properly retrieve hostname from request.
This commit is contained in:
parent
a8c8b48390
commit
8d057c8614
1 changed files with 2 additions and 2 deletions
|
@ -23,9 +23,9 @@ func RequestCallback(w http.ResponseWriter, r *http.Request) bool {
|
||||||
scheme = "https"
|
scheme = "https"
|
||||||
}
|
}
|
||||||
|
|
||||||
hostname, _, err := net.SplitHostPort(r.URL.Host)
|
hostname, _, err := net.SplitHostPort(r.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
hostname = r.URL.Host
|
hostname = r.Host
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream, err := url.Parse(scheme + "://" + hostname + ":" + AlternatePort)
|
upstream, err := url.Parse(scheme + "://" + hostname + ":" + AlternatePort)
|
||||||
|
|
Loading…
Reference in a new issue