We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9f3dfa commit 0431e12Copy full SHA for 0431e12
coderd/httpmw/prometheus.go
@@ -113,7 +113,8 @@ func getRoutePattern(r *http.Request) string {
113
}
114
115
tctx := chi.NewRouteContext()
116
- if !rctx.Routes.Match(tctx, r.Method, routePath) {
+ routes := rctx.Routes
117
+ if routes != nil && routes.Match(tctx, r.Method, routePath) {
118
// No matching pattern, so just return an empty string.
119
// It is done to avoid returning a static path for frontend requests.
120
return ""
0 commit comments