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.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/source/gitlab/gitlab.go b/internal/source/gitlab/gitlab.go
index d3fbc8cc..2de113f8 100644
--- a/internal/source/gitlab/gitlab.go
+++ b/internal/source/gitlab/gitlab.go
@@ -72,17 +72,18 @@ func (g *Gitlab) Resolve(r *http.Request) (*serving.Request, error) {
return nil, response.Error
}
- urlPath := path.Clean(r.URL.Path)
+ urlPath := strings.ToLower(path.Clean(r.URL.Path))
size := len(response.Domain.LookupPaths)
for _, lookup := range response.Domain.LookupPaths {
- isSubPath := strings.HasPrefix(urlPath, lookup.Prefix)
- isRootPath := urlPath == path.Clean(lookup.Prefix)
+ lookupPrefix := strings.ToLower(lookup.Prefix)
+ isSubPath := strings.HasPrefix(urlPath, lookupPrefix)
+ isRootPath := urlPath == path.Clean(lookupPrefix)
if isSubPath || isRootPath {
subPath := ""
if isSubPath {
- subPath = strings.TrimPrefix(urlPath, lookup.Prefix)
+ subPath = strings.TrimPrefix(urlPath, lookupPrefix)
}
srv, err := g.fabricateServing(lookup)