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.
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_PORTis changed orHTTP_HOSTincludes the port.ProxyFixshould setSERVER_PORT = X-Forwarded-Port, or Flask's deploy docs should addproxy_set_header Host $host:$server_port;. Not really sure which one is correct, I've seen both mentioned.