Skip to content
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

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

tomharvey
Copy link

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.

@tomharvey tomharvey closed this Jun 24, 2023
@tomharvey tomharvey reopened this Jun 24, 2023
Copy link
Contributor

@jeremyevans jeremyevans left a 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.

lib/rack/set_x_forwarded_proto_header.rb Outdated Show resolved Hide resolved
lib/rack/set_x_forwarded_proto_header.rb Outdated Show resolved Hide resolved
test/spec_set_x_forwarded_proto_header.rb Show resolved Hide resolved
test/spec_set_x_forwarded_proto_header.rb Show resolved Hide resolved
lib/rack/set_x_forwarded_proto_header.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@jeremyevans jeremyevans left a 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.

test/spec_set_x_forwarded_proto_header.rb Show resolved Hide resolved
test/spec_set_x_forwarded_proto_header.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@jeremyevans jeremyevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@tomharvey
Copy link
Author

Looks good, thanks!

Great. Thanks for the speedy and clear feedback on the review

@ioquatix
Copy link
Member

Do you mind checking why the tests are failing?

DEPRECATED: Use assert_nil if expecting nil from /home/runner/work/rack/rack/test/spec_set_x_forwarded_proto_header.rb:25. This will fail in Minitest 6.

@tomharvey
Copy link
Author

will have a look tomorrow.

Do you mind checking why the tests are failing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants