-
-
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
Add header support for middleware #1244
Conversation
val ? @header[key.to_s] = val : @header.delete(key.to_s) | ||
else | ||
@header | ||
module HeaderMethods |
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.
Should be in a separate file probably. And I don't love the name "HeaderMethods", maybe just "Headers"?
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.
Agreed. I'll fix it.
120c087
to
f21e75a
Compare
Fixed and force pushed. |
response | ||
end | ||
|
||
def reflect_headers(response) |
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.
Should this be private?
Maybe rename it to merge_headers
?
Sorry more minor comments, please. |
Extract #headers from DSL::InsideRoute to DSL::Headers
f21e75a
to
967db12
Compare
Thanks for polite reviewing! Pushed. |
Add header support for middleware
Merged, thanks! |
ref #1069
This adds the
header
method for activating it in our middleware.Could you review the pull request?