diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-06-01 20:06:41 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2022-06-01 20:06:41 +0300 |
commit | 08430ea180dda0e766a34b64de016649fb9c4549 (patch) | |
tree | 644fcd509e11feb8da755c7fc83df3aebdd8d02a /internal/auth | |
parent | ac760ac9c5b329309f5516b815ffc4b0670ef7ec (diff) |
Add comment about https redirect in authorization middleware
Diffstat (limited to 'internal/auth')
-rw-r--r-- | internal/auth/middleware.go | 2 |
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 |