-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 can be inserted before or after defaults #1393
Conversation
a72b8ec
to
24024d2
Compare
@@ -5,6 +5,7 @@ | |||
|
|||
#### Features | |||
|
|||
* [#1393](https://github.com/ruby-grape/grape/pull/1393): Middleware can be inserted before or after default Grape middleware - [@ridiculous](https://github.com/ridiculous). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the CHANGELOG entry below covers this functionality, I would just add , [#1393]
to it. No big deal.
Very nice, merged. |
Nice :) Although with only #1390 you could position your middleware around the default middleware, for example with:
Just out of curiosity, what was the use case not considered? |
Sorry @rosa I think I don't understand the question :) |
@rosa It let's you reference middleware added after https://github.com/ruby-grape/grape/pull/1393/files#diff-8e15cddb80f42ca7d43872846d80ecbeR263, which is pretty much just the formatter and versioner |
Ah, got it! I was using my changes just to insert a middleware before |
Builds onto the new middleware stack introduced in #1390. This is useful because it allows positioning of middleware around default Grape middleware.