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

Remove deprecated trusted_proxies config option#7868

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
JarJak wants to merge4 commits intosymfony:masterfromJarJak:patch-1

Conversation

@JarJak
Copy link
Contributor

@JarJakJarJak commentedMay 3, 2017
edited by weaverryan
Loading

"[BC BREAK] The "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter have been removed. Use the Request::setTrustedProxies() method in your front controller instead."

By the way, is 'trusted_hosts' config option still revellant?

Fixes:#7671

xmlns:framework="http://symfony.com/schema/dic/symfony"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
..code-block::diff
Copy link
Member

Choose a reason for hiding this comment

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

Currently,diff does not work (we need#7806 for it). We should rewrite the example a bit and use the commonphp code block instead.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Can you change it to fit the needs? I'm not sure how this parser works.

@weaverryanweaverryan added this to the3.3 milestoneMay 8, 2017
Copy link
Member

@xabbuhxabbuh left a comment

Choose a reason for hiding this comment

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

👍 I just pushed an update for the code block.

@weaverryan
Copy link
Member

This is great! But.... it's not quite done yet! This fixes#7671 (yay!). But check out the comment in that issue. In 3.3,setTrustedProxies() has a requiredsecond argument:https://github.com/symfony/symfony/blob/fb532bfc172a531bce4219e4f21db124eb972bbc/src/Symfony/Component/HttpFoundation/Request.php#L591-L594

We need to update the example to pass this value, and mention what it is.

@JarJak do you think you could make that change?

@JarJak
Copy link
ContributorAuthor

JarJak commentedMay 15, 2017 via email

Yes, sure I will :)14.05.2017 9:43 PM "Ryan Weaver" <notifications@github.com> napisał(a):
This is great! But.... it's not quite done yet! This fixes#7671 <#7671> (yay!). But check out the comment in that issue. In 3.3, setTrustedProxies() has a required *second* argument:https://github.com/symfony/symfony/blob/ fb532bfc172a531bce4219e4f21db124eb972bbc/src/Symfony/ Component/HttpFoundation/Request.php#L591-L594 We need to update the example to pass this value, and mention what it is.@JarJak <https://github.com/jarjak> do you think you could make that change? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#7868 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AEwC8qSo_JZQfczwZG2amyJgU2tWjlHXks5r51l5gaJpZM4NPdar> .

@JarJak
Copy link
ContributorAuthor

Sorry, but actually I am not sure how to describe this "header" option because I've never used it :(

@nicolas-grekas
Copy link
Member

I think that this PR should also be the one fixing#7045
by telling aboutRequest::HEADER_X_FORWARDED_AWS_ELB

@weaverryan
Copy link
Member

I just chatted with Nicolas about this! There are a few situations:

A) On AWS behind an ELB

Request::setTrustedProxies([...], Request::HEADER_X_FORWARDED_AWS_ELB);

B) On most other systems (systems where your proxy passesX-FORWARDED-* headers:

Request::setTrustedProxies([...], Request::HEADER_X_FORWARDED_ALL);

C) If your load balancer passes the "Forwarded" header from rfc 7239, then use:

Request::setTrustedProxies([...], Request::HEADER_FORWARDED);

For the IP address - the[...] part, this is still the same IP address or IP range of your proxy as before. And as before if your IP constantly changes (like on ELB), you should still use$request->server->get('REMOTE_ADDR') (assuming public traffic cannot hit your server directly). In other words, this note is still valid:http://symfony.com/doc/current/request/load_balancer_reverse_proxy.html#but-what-if-the-ip-of-my-reverse-proxy-changes-constantly (it just needs to be updated to have a 2nd argument).

@JarJak Would you care to update your PR given this new info? I also had problems understanding it at first :)

@weaverryan
Copy link
Member

Hey@JarJak! I've just finished this PR in#7952 - just because this is an important change and the release is upon us! But, your commits are in that PR - so youare a Symfony Docs contributor :).

Thanks!

weaverryan added a commit that referenced this pull requestMay 30, 2017
…roxies removal (JarJak, xabbuh, weaverryan)This PR was merged into the 3.3 branch.Discussion----------[3.3] Finishing setTrustedProxies() changes & trusted_proxies removalFinishes#7868Commits-------c7087bf tweaks thanks to review45b419d Adding second argument to setTrustedProxies() and removing old information2f83164 replace trusted_proxies reference3632c08 replace diff code block with PHP code block1825c83 Remove deprecated trusted_proxies config optiondf63034 Remove deprecated trusted_proxies config option
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

5 participants

@JarJak@weaverryan@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp