You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that this has traditionally been a task of something like Negroni or Martini, but I think it's a good idea to instead handle it in the mux layer.
Life is good. If I need a piece of middleware for Gzip, I can add that to Negroni. However, let's say that I need to use an authentication middleware for anything beginning with "/client-data," I need to explicitly call a function in every handler.
It'd be really nice to just be able to pop a piece of middleware onto the subrouter. Is this type of thing beyond the scope of the project? Is there another way for this that I am missing?
The text was updated successfully, but these errors were encountered:
Sorry, didn't realize the is-open flag was the default on GitHub and didn't notice #36. However, I don't understand why you don't want this... API complexity is understandable, but I think that this would be really helpful.
The "opinionated" argument doesn't really stand since you don't have to use the middleware. Plus, there's no way to integrate anything into a subrouter, so it's painful to "implement it elsewhere."
I know that this has traditionally been a task of something like Negroni or Martini, but I think it's a good idea to instead handle it in the mux layer.
For example, say I create a subrouter like this:
Life is good. If I need a piece of middleware for Gzip, I can add that to Negroni. However, let's say that I need to use an authentication middleware for anything beginning with "/client-data," I need to explicitly call a function in every handler.
It'd be really nice to just be able to pop a piece of middleware onto the subrouter. Is this type of thing beyond the scope of the project? Is there another way for this that I am missing?
The text was updated successfully, but these errors were encountered: