Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all status routes to use the mux router #51914

Closed
yzhan1 opened this issue Mar 19, 2024 · 0 comments · Fixed by #51915 or #52236
Closed

Move all status routes to use the mux router #51914

yzhan1 opened this issue Mar 19, 2024 · 0 comments · Fixed by #51915 or #52236

Comments

@yzhan1
Copy link
Contributor

yzhan1 commented Mar 19, 2024

Enhancement

Currently, some routes in the status endpoint are registered to the http.ServeMux directly, while some are registered to the mux.Router. Since both serves the same purpose and there seems to be no custom handling between routes registered behind ServeMux and Router, it's better to consolidate them so we only register routes on the mux.Router. It's cleaner and makes it easier in the future if we want to add a middleware for all routes.

Sample:

serverMux.HandleFunc("/debug/pprof/", pprof.Index)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant