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

contrib/gorilla/mux: add router wrapper #1175

Merged
merged 1 commit into from Feb 22, 2022

Conversation

Julio-Guerra
Copy link
Contributor

@Julio-Guerra Julio-Guerra commented Feb 18, 2022

Based on user feedback we had that didn't want to totally replace their gorilla/mux imports by ours, we would like to propose them the alternative of rather importing our contrib to wrap their gorilla router instead. To do so, we introduced a new function called WrapRouter() that wraps the given gorilla mux router with our wrapper.

Note that a pure gorilla middleware is not a good option for us because they do not get called when the route is not found, leading the missing all the 404 on routes that were not found on the router. This impacts both the APM tracing and the AppSec monitoring. So the current solution with WrapRouter instead is the best possible solution to be able to monitor every request entering the router.

@Julio-Guerra Julio-Guerra added this to the 1.37.0 milestone Feb 18, 2022
@Julio-Guerra Julio-Guerra requested review from a team and ajgajg1134 February 18, 2022 14:05
@Julio-Guerra Julio-Guerra merged commit 73630da into v1 Feb 22, 2022
@Julio-Guerra Julio-Guerra deleted the julio.guerra/gorilla-router-wrapper branch February 22, 2022 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants