From ea70711dd34c239f79ed1c4630ad047c69ff4fc2 Mon Sep 17 00:00:00 2001 From: ben-toogood Date: Thu, 13 Feb 2020 12:02:29 +0000 Subject: [PATCH] Exclude Stats & Trace from Auth (#1192) --- util/wrapper/wrapper.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/wrapper/wrapper.go b/util/wrapper/wrapper.go index 9f211a92..01767b04 100644 --- a/util/wrapper/wrapper.go +++ b/util/wrapper/wrapper.go @@ -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) }