Exclude Stats & Trace from Auth (#1192)

This commit is contained in:
ben-toogood 2020-02-13 12:02:29 +00:00 committed by GitHub
parent 6dc942bc19
commit ea70711dd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,7 +154,8 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
// Check for endpoints excluded from auth. If the endpoint // Check for endpoints excluded from auth. If the endpoint
// matches, execute the handler and return // matches, execute the handler and return
for _, e := range a.Options().Excludes { excludes := append(a.Options().Excludes, "Stats", "Trace")
for _, e := range excludes {
if e == endpoint { if e == endpoint {
return h(ctx, req, rsp) return h(ctx, req, rsp)
} }