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

Middleware for handling vendor-specific $vendor-forwarded-proto -> x-forwarded-proto. #192

Closed
wants to merge 1 commit into from

Conversation

ioquatix
Copy link
Member

@ioquatix ioquatix commented Jun 5, 2024

Copy link
Contributor

@mpalmer mpalmer left a comment

Choose a reason for hiding this comment

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

It does what it says on the tin, and the test cases seem comprehensive, so 🎉.

I do wonder if SetXForwardedProtoHeader is the right name; it's not "setting" the header so much as using an alternate source. "Naming things" being, of course, one of the hard things, I don't want to block merge on it, but if AlternateXForwardedProtoHeader, for example, were to strike you as a suitable name, I wouldn't be against changing it.

@ioquatix
Copy link
Member Author

ioquatix commented Jun 5, 2024

I would like to change the name. I outlined my thoughts here: rack/rack#2089 (comment)

@tomharvey would you like to work on refining this a bit more?

@mpalmer
Copy link
Contributor

mpalmer commented Jun 5, 2024

A generic Foo-Forwarded-* -> Forwarded transmogrifier would probably be the platonic ideal -- I just didn't want to let the enemy be the perfect of the "well, I guess it's better than nothing" 😀 . I can't find any existing support for (eg) CloudFront-Viewer-Address anywhere in Rack, so presumably most people in this situation would want that header translated as well, at the very least.

@tomharvey
Copy link

As mentioned in rack/rack#2089 I've created a new PR here #193 and I can pick up the feedback from @mpalmer as I continue to work in that branch.

@ioquatix ioquatix closed this Jun 5, 2024
@ioquatix ioquatix deleted the set-x-forwarded-proto-header branch June 5, 2024 14:27
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.

3 participants