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
diff options
context:
space:
mode:
Diffstat (limited to 'internal/source/gitlab/gitlab.go')
-rw-r--r--internal/source/gitlab/gitlab.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/source/gitlab/gitlab.go b/internal/source/gitlab/gitlab.go
index 0221fd11..7977e35a 100644
--- a/internal/source/gitlab/gitlab.go
+++ b/internal/source/gitlab/gitlab.go
@@ -8,6 +8,7 @@ import (
"strings"
"gitlab.com/gitlab-org/gitlab-pages/internal/domain"
+ "gitlab.com/gitlab-org/gitlab-pages/internal/request"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab/api"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab/cache"
@@ -58,7 +59,8 @@ func (g *Gitlab) GetDomain(name string) (*domain.Domain, error) {
// Resolve is supposed to get the serving lookup path based on the request from
// the GitLab source
func (g *Gitlab) Resolve(r *http.Request) (*serving.LookupPath, string, error) {
- response := g.client.GetLookup(r.Context(), r.Host)
+ host := request.GetHostWithoutPort(r)
+ response := g.client.GetLookup(r.Context(), host)
if response.Error != nil {
return nil, "", response.Error
}