-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Cloudfront forwarded proto header #2089
Cloudfront forwarded proto header #2089
Conversation
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.
Thanks for the pull request. Please see the requested changes.
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.
Looks good. One more minor spec change requested, then I'm fine with this.
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.
Looks good, thanks!
Great. Thanks for the speedy and clear feedback on the review |
Do you mind checking why the tests are failing?
|
will have a look tomorrow.
|
I'm OK with merging this if the conflicts and test issues are fixed. |
+1 Seems like there's a merge conflict committed. @tomharvey after you fix the conflicts would you mind squashing this PR? Thank you! |
Hey hey - will do. Sorry, thought I'd switch it over to a draft while I sorted out my nonsense. Sorry for the noise. |
bca8dca
to
f30aae3
Compare
HTTP_ prefix renaming middleware class to be vendor agnostic testing for early return on missing vendor forwarded header renaming files to match classnames removing unused imports assume uppercase header from client adding a note on usage transforming the header string removing AWS mention in the example docs removing Cloudfront specific headers from the specs inlining the header string transformation sinplifying the call method adding a test to verify that an existing X-Forwarded-Proto header is overwritten by vendor header value adding to README and Changelog fixing spec to check header is unset instead of testing for old method updating the spec description explicit requires for seperate testing
f30aae3
to
05e7b61
Compare
Fixed my obvious doofus errors. Squashed Tests run locally in ruby 3.2.2 - can I have some workflows to check the other versions please? |
I understand the problem trying to be solved with this middleware, but after consideration, I disagree with merging this PR into
As such, I'd like to revert this PR and suggest moving it to |
I’m unclear if the above is a proposal for the team to consider or a decision on the way forward. Can you clarify how the rack team makes these kinds of decisions? If rack-contrib is the way forward; I’d appreciate the opportunity to move the code to rack-contrib myself. |
It's now a decision on the way forward. Apologies for being opaque, but sufficient consensus was reached within the @rack/release-managers team.
Please do - either continue the work from here (a copy of this PR) or open a new one. I'd be delighted if you could continue the work. |
I'd prefer to open a new one, with apologies to @mpalmer that the PR will lose his valuable feedback. My motivation is based on an opportunity to contribute a useful feature to a project that has given the community so much. But, I do still expect that my contributions would be recognised as my own instead of a PR from @ioquatix |
Ok - taking another swing at solving #2080
This time where we can pass any header in and the value of that will be copied to the value of
HTTP_X_FORWARDED_PROTO
This allows the user to rely on the value in
CloudFront-Forwarded-Proto
provided by AWS Cloudfront. If other vendors have custom headers for this, then this should also provide an option.