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

Appearance settings

Always trust 127.0.0.1 as a proxy #9292

Copy link
Copy link
Closed
@samuelvogel

Description

@samuelvogel
Issue body actions

The remote address in a fragment sub-request is always set to 127.0.0.1 and the original remote address is pushed into the X-FORWARDED_FOR header. This is the expected behavior implemented by @fabpot in 2f3b33a and explained for the HttpCache component here.

But when retrieving the client IP via Request::getClientIp(), one will now always get 127.0.0.1 when it's not added as a trusted proxy. This seems strange, as it will most likely be incorrect and might confuse users which now have to mangle with configuring a trusted proxy, even though they don't actually have a real proxy in place.

Also in the commit message of 2f3b33a it says:

also making getClientIp smarter by removing possible local IP addresses from being considered as the client IP address

But no according change is part of that commit, getClientIp does actually consider 127.0.0.1 as the client IP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueIdeal for your first contribution! (some Symfony experience may be required)Ideal for your first contribution! (some Symfony experience may be required)HttpFoundation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.