Skip to content

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

Closed
ioquatix wants to merge 1 commit into
mainfrom
set-x-forwarded-proto-header
Closed

Middleware for handling vendor-specific $vendor-forwarded-proto -> x-forwarded-proto.#192
ioquatix wants to merge 1 commit into
mainfrom
set-x-forwarded-proto-header

Conversation

@ioquatix

@ioquatix ioquatix commented Jun 5, 2024

Copy link
Copy Markdown
Member

@mpalmer mpalmer left a comment

Copy link
Copy Markdown
Contributor

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

ioquatix commented Jun 5, 2024

Copy link
Copy Markdown
Member Author

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

mpalmer commented Jun 5, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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