diff options
author | Kassio Borges <kborges@gitlab.com> | 2023-04-04 12:32:18 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2023-04-04 12:32:18 +0300 |
commit | 7946cb0dc92ac6a306b55af1ec3c17dc936d742c (patch) | |
tree | 006e691eb52cb4e33987e11e80026ae17646ebd9 /app.go | |
parent | 7817434f90966c6cd5dbee8fd1894c039eddc8af (diff) |
Redirect to unique domain
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -40,6 +40,7 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/source" "gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab" "gitlab.com/gitlab-org/gitlab-pages/internal/tls" + "gitlab.com/gitlab-org/gitlab-pages/internal/uniqueDomain" "gitlab.com/gitlab-org/gitlab-pages/internal/urilimiter" "gitlab.com/gitlab-org/gitlab-pages/metrics" ) @@ -133,6 +134,7 @@ func setRequestScheme(r *http.Request) *http.Request { func (a *theApp) buildHandlerPipeline() (http.Handler, error) { // Handlers should be applied in a reverse order handler := a.serveFileOrNotFoundHandler() + handler = uniqueDomain.NewMiddleware(handler) handler = a.Auth.AuthorizationMiddleware(handler) handler = routing.NewMiddleware(handler, a.source) |