-
-
Notifications
You must be signed in to change notification settings - Fork 982
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
Middleware Chaining Not Respected by NotFound Handler #837
Labels
Comments
yes, this I’ve seen this confusion in the past — which is that at least one handler must be defined on a router for it to build the middleware stack. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to set up a "catch all" route. Anything that goes to "catchall/some/other/thing" should go the
allHandler
. I have values that I am setting onto the context in my middleware. These values ONLY show up if I user.HandleFunc("/", allHandler )
- if I only use theNotFound
handler, then the middleware is never set.This feels like a bug - I'd have expected the
r.HandleFunc
to not be needed to register the middleware.The text was updated successfully, but these errors were encountered: