Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpFoundation] reintroduce set trusted header name in request#32961

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed

Conversation

@brambaud
Copy link

QA
Branch?4.4
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#26333
LicenseMIT
Doc PRTODO

I think it could be great to reintroduce in a simple way the ability to support custom header names .

Indeed, not everyone can use "standard" header name (seefideloper/TrustedProxy#108 for instance).
Some people start using workaround likehttps://github.com/jdavidbakr/CloudfrontProxies.

I personally need it for some Drupal sites.

@brambaudbrambaudforce-pushed theissue/26333/custom-headers branch from55e3355 tod9c3cf4CompareAugust 5, 2019 18:57
@nicolas-grekasnicolas-grekas added this to thenext milestoneAug 6, 2019
@nicolas-grekas
Copy link
Member

I pretty much like whathttps://github.com/jdavidbakr/CloudfrontProxies does.
It does more than just turning cloudfront-forwarded-proto into x-forwarded-proto, since it also loads the list of trusted proxies.
Not sure we need more, don't you think?

@brambaud
Copy link
Author

https://github.com/jdavidbakr/CloudfrontProxies does more its true, that was just an example.

Indeed the workaround is to do something like
$_SERVER['HEADER_X_FORWARDED_PROTO'] = $_SERVER['HEADER_X_CUSTOM_FORWARDED_PROTO'];

It feels a bit "hacky" to me nevertheless I agree that it could be enough for the majority.

@nicolas-grekas
Copy link
Member

@brambaud would you mindopening a doc issue or PR, then close this issue please if you're OK to?

@brambaud
Copy link
Author

I'm ok :)
I'll open a PR shortly to update the documentation then I'll close this one. Thanks!

@brambaud
Copy link
Author

Closing in favor ofsymfony/symfony-docs#12117

OskarStark added a commit to symfony/symfony-docs that referenced this pull requestAug 16, 2019
…aud)This PR was merged into the 3.4 branch.Discussion----------add support for custom headers when using a proxy<!--If your pull request fixes a BUG, use the oldest maintained branch that containsthe bug (seehttps://symfony.com/roadmap for the list of maintained branches).If your pull request documents a NEW FEATURE, use the same Symfony branch wherethe feature was introduced (and `master` for features of unreleased versions).-->Seesymfony/symfony#32961 andsymfony/symfony#26333.We should document how to use custom headers when using reverse proxies since `Request::setTrustedHeaderName()` has been deprecated.Commits-------a63c5a6 add support for custom headers when using a proxy
@nicolas-grekasnicolas-grekas modified the milestones:next,4.4Oct 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

3 participants

@brambaud@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp