letsencrypt: properly retrieve hostname from request.

This commit is contained in:
Den Quixote 2016-01-30 02:20:34 +01:00
parent a8c8b48390
commit 8d057c8614

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)