From 7946cb0dc92ac6a306b55af1ec3c17dc936d742c Mon Sep 17 00:00:00 2001 From: Kassio Borges Date: Tue, 4 Apr 2023 09:32:18 +0000 Subject: Redirect to unique domain --- app.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app.go') diff --git a/app.go b/app.go index f35df26c..96aa084b 100644 --- a/app.go +++ b/app.go @@ -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) -- cgit v1.2.3