1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +02:00

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

View File

@@ -154,7 +154,8 @@ func AuthHandler(fn func() auth.Auth) server.HandlerWrapper {
// Check for endpoints excluded from auth. If the endpoint
// 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 {
return h(ctx, req, rsp)
}