diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-09-29 14:43:54 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-09-29 14:43:54 +0300 |
commit | 636d1e313486c061d769a80ade0e62df40025f42 (patch) | |
tree | c5e96acc4dcbe3770a302a9d7c195f83fa615c4c | |
parent | a6d89a8f28cdb4bc054b708cae1023d2e089a099 (diff) |
docs: update middlewares method doc for signature change
-rw-r--r-- | internal/acme/middleware.go | 2 | ||||
-rw-r--r-- | internal/auth/middleware.go | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/internal/acme/middleware.go b/internal/acme/middleware.go index bbb2ef04..fa9d696c 100644 --- a/internal/acme/middleware.go +++ b/internal/acme/middleware.go @@ -6,7 +6,7 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/request" ) -// NewMiddleware returns middleware which handle ACME challenges +// AcmeMiddleware handles ACME challenges func (m *Middleware) AcmeMiddleware(handler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { domain := request.GetDomain(r) diff --git a/internal/auth/middleware.go b/internal/auth/middleware.go index 4eb1e943..a9cb6c56 100644 --- a/internal/auth/middleware.go +++ b/internal/auth/middleware.go @@ -7,7 +7,7 @@ import ( "gitlab.com/gitlab-org/gitlab-pages/internal/source" ) -// NewMiddleware returns middleware which handles authentication requests +// AuthenticationMiddleware handles authentication requests func (a *Auth) AuthenticationMiddleware(handler http.Handler, s source.Source) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if a.TryAuthenticate(w, r, s) { @@ -18,7 +18,7 @@ func (a *Auth) AuthenticationMiddleware(handler http.Handler, s source.Source) h }) } -// NewMiddleware returns middleware which handle authorization +// AuthorizationMiddleware handles authorization func (a *Auth) AuthorizationMiddleware(handler http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { domain := request.GetDomain(r) |