Skip to content

ProxyFix should use X-Forwarded-Port #1023

Description

@davidism

Reporting this against Werkzeug, ignore the fact that I keep saying Flask. ;-)

If the app is behind a proxy and the proxy is listening on a non-standard port (ex. 8080), Flask will not generate valid urls unless SERVER_PORT is changed or HTTP_HOST includes the port.

ProxyFix should set SERVER_PORT = X-Forwarded-Port, or Flask's deploy docs should add proxy_set_header Host $host:$server_port;. Not really sure which one is correct, I've seen both mentioned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions