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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-01 20:06:41 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-01 20:06:41 +0300
commit08430ea180dda0e766a34b64de016649fb9c4549 (patch)
tree644fcd509e11feb8da755c7fc83df3aebdd8d02a
parentac760ac9c5b329309f5516b815ffc4b0670ef7ec (diff)
Add comment about https redirect in authorization middleware
-rw-r--r--internal/auth/middleware.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/auth/middleware.go b/internal/auth/middleware.go
index 266cf512..6894d8d0 100644
--- a/internal/auth/middleware.go
+++ b/internal/auth/middleware.go
@@ -41,6 +41,8 @@ func (a *Auth) AuthorizationMiddleware(handler http.Handler) http.Handler {
return
}
+ // This is not auth related but there's no point in having
+ // an extra middleware just for this.
if lp.IsHTTPSOnly && !request.IsHTTPS(r) {
redirectToHTTPS(w, r, http.StatusMovedPermanently)
return