Merge pull request #551 from denquixote/acmehandlehost

letsencrypt: properly retrieve hostname from request.
This commit is contained in:
Matt Holt 2016-02-01 09:23:03 -07:00
commit 79db939259

View File

@ -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)