Skip to content

Add support for Plug.RewriteOn to rewrite nonstandard headers #1272

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

Merged
merged 2 commits into from
Jun 24, 2025

Conversation

schrockwell
Copy link
Contributor

@schrockwell schrockwell commented Jun 23, 2025

Some HTTPS proxies use nonstandard headers. For example, AWS CloudFront uses the CloudFront-Forwarded-Proto which cannot be changed.

This PR keeps the existing rewrite functionality and extends it with the ability to specify custom header names, e.g. :x_forwarded_proto could be specified as {:scheme, "CloudFront-Forwarded-Proto"} in this case.

@josevalim josevalim merged commit 8df27ac into elixir-plug:main Jun 24, 2025
1 of 2 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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.

2 participants