Commit 8d057c86 authored by Den Quixote's avatar Den Quixote

letsencrypt: properly retrieve hostname from request.

parent a8c8b483
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment