diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2020-09-25 13:10:24 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2020-09-25 13:10:24 +0300 |
commit | d5198624500b29d9f7261ed63e37e97eaa0109fc (patch) | |
tree | a9423dd0c5062200ed625574c1b78face1819aa0 /internal/source/gitlab | |
parent | 0899dad1029a2a326f284b1be8eb3804d6ad8734 (diff) |
Do not trim Path on fabricate
Diffstat (limited to 'internal/source/gitlab')
-rw-r--r-- | internal/source/gitlab/factory.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/internal/source/gitlab/factory.go b/internal/source/gitlab/factory.go index 149b3595..39193a16 100644 --- a/internal/source/gitlab/factory.go +++ b/internal/source/gitlab/factory.go @@ -1,8 +1,6 @@ package gitlab import ( - "strings" - log "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitlab-pages/internal/serving" @@ -18,7 +16,7 @@ import ( func fabricateLookupPath(size int, lookup api.LookupPath) *serving.LookupPath { return &serving.LookupPath{ Prefix: lookup.Prefix, - Path: strings.TrimPrefix(lookup.Source.Path, "/"), + Path: lookup.Source.Path, IsNamespaceProject: (lookup.Prefix == "/" && size > 1), IsHTTPSOnly: lookup.HTTPSOnly, HasAccessControl: lookup.AccessControl, |