Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'app.go')
-rw-r--r--app.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/app.go b/app.go
index 25a87785..9d275d29 100644
--- a/app.go
+++ b/app.go
@@ -3,7 +3,6 @@ package main
import (
"crypto/tls"
"errors"
- "net"
"net/http"
"sync"
@@ -87,11 +86,7 @@ func (a *theApp) redirectToHTTPS(w http.ResponseWriter, r *http.Request, statusC
}
func (a *theApp) getHostAndDomain(r *http.Request) (string, *domain.Domain, error) {
- host, _, err := net.SplitHostPort(r.Host)
- if err != nil {
- host = r.Host
- }
-
+ host := request.GetHostWithoutPort(r)
domain, err := a.domain(host)
return host, domain, err