Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Framework] trusted_proxies: private_ranges #51826

Closed
@dkarlovi

Description

@dkarlovi

Description

Currently, if your app is behind a reverse proxy, you need to enable trusted proxies to be sure Symfony will understand it's using HTTPS.

Typically it looks like this:

framework:
    # localhost, Docker, Kubernetes
    trusted_proxies: 127.0.0.1, 172.16.0.0/12, 10.0.0.0/8

Caddy solves the same issue by having a dedicated alias called private_ranges:

As a shortcut, private_ranges can be used to match all private IPv4 and IPv6 ranges. It's the same as specifying all of these ranges: 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 127.0.0.1/8 fd00::/8 ::1

Proposal is to introduce the same alias for these specific values to allow easier configuration in this circumstance.

Example

framework:
    trusted_proxies: private_ranges

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions