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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user