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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2020-02-03 18:17:56 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2020-02-05 14:00:21 +0300
commit4d5764a77935ef502e34fed33f74e69ba1cebc6b (patch)
treec17b25be29c63ab9c3613f548f89b27153d2d552 /internal/source
parent57a8b1184da1d53184aad5d4f0bedea51d330b1a (diff)
Add support for per-lookup-path domain serving
Diffstat (limited to 'internal/source')
-rw-r--r--internal/source/gitlab/gitlab.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/internal/source/gitlab/gitlab.go b/internal/source/gitlab/gitlab.go
index cce70733..79b58501 100644
--- a/internal/source/gitlab/gitlab.go
+++ b/internal/source/gitlab/gitlab.go
@@ -72,14 +72,7 @@ func (g *Gitlab) Resolve(r *http.Request) (*serving.LookupPath, string, error) {
isRootPath := urlPath == path.Clean(lookup.Prefix)
if isSubPath || isRootPath {
- lookupPath := &serving.LookupPath{
- Prefix: lookup.Prefix,
- Path: strings.TrimPrefix(lookup.Source.Path, "/"),
- IsNamespaceProject: (lookup.Prefix == "/" && len(response.Domain.LookupPaths) > 1),
- IsHTTPSOnly: lookup.HTTPSOnly,
- HasAccessControl: lookup.AccessControl,
- ProjectID: uint64(lookup.ProjectID),
- }
+ lookupPath := serving.NewLookupPath(len(response.Domain.LookupPaths), lookup)
subPath := ""
if isSubPath {