mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 10:13:39 +08:00
Merge pull request #551 from denquixote/acmehandlehost
letsencrypt: properly retrieve hostname from request.
This commit is contained in:
commit
79db939259
|
@ -23,9 +23,9 @@ func RequestCallback(w http.ResponseWriter, r *http.Request) bool {
|
|||
scheme = "https"
|
||||
}
|
||||
|
||||
hostname, _, err := net.SplitHostPort(r.URL.Host)
|
||||
hostname, _, err := net.SplitHostPort(r.Host)
|
||||
if err != nil {
|
||||
hostname = r.URL.Host
|
||||
hostname = r.Host
|
||||
}
|
||||
|
||||
upstream, err := url.Parse(scheme + "://" + hostname + ":" + AlternatePort)
|
||||
|
|
Loading…
Reference in New Issue
Block a user