From d6ad67a6de0c2c6965aeba5781993390156de4c2 Mon Sep 17 00:00:00 2001
From: Benoit Sigoure <tsunanet@gmail.com>
Date: Fri, 19 Apr 2019 14:15:32 -0700
Subject: [PATCH] server: add metrics for CORS handlers.

---
 server/server.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/server.go b/server/server.go
index c338584e..9dc259fb 100644
--- a/server/server.go
+++ b/server/server.go
@@ -257,7 +257,7 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy)
 			corsOption := handlers.AllowedOrigins(c.AllowedOrigins)
 			handler = handlers.CORS(corsOption)(handler)
 		}
-		r.Handle(path.Join(issuerURL.Path, p), handler)
+		r.Handle(path.Join(issuerURL.Path, p), instrumentHandlerCounter(p, handler))
 	}
 	r.NotFoundHandler = http.HandlerFunc(http.NotFound)
 
-- 
GitLab