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

RequestFactory: extract port from x-forwarded-host #230

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

Izolex
Copy link
Contributor

@Izolex Izolex commented Nov 15, 2023

The unification of host and port parsing was added in #229. Initially, I was uncertain whether the distinct parsing approaches for the Host and X-Forwarded headers compared to the X-Forwarded-Host header were intentional, since the X-Forwarded-* headers lack a formal specification. However, it's commonly observed that the X-Forwarded-Host header may contain the value of the Host header, which may include the port. Currently, if this header includes both the host and the port, the entire string is simply stored in the host field of the resulting URL. The goal of this PR is to parse this header using the parseHostAndPort method, to ensure that the port is correctly separated and stored into the port field.

Since this PR uses the method added in #229 it's based on the commit that was merged into the master branch.

@dg
Copy link
Member

dg commented Nov 4, 2024

Thanks

@dg dg merged commit 089e9f9 into nette:master Nov 4, 2024
2 of 5 checks passed
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