Merge pull request from tsuna/master

server: add metrics for CORS handlers.
This commit is contained in:
Eric Chiang 2019-05-12 10:40:23 -07:00 committed by GitHub
commit cd3c6983da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)