Exclude Stats & Trace from Auth (#1192)
This commit is contained in:
parent
6dc942bc19
commit
ea70711dd3
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user