Closed vanschelven closed 8 months ago
I don't see much literature about receiving a comma-separated list. The main references I could find have either "https"
or "http"
.
Do you not consider the list in the linked resource sufficiently authoritative enough or did you perhaps miss it? Quoted below:
Similar issues have been raised and implemented in other projects, for example:
Tornado:
Ruby:
Reactor-Netty:
Implementation: https://github.com/reactor/reactor-netty/commit/e190d5bbf65d88d3a0240cd60b81e1ee1907030e https://github.com/reactor/reactor-netty/commit/e190d5bbf65d88d3a0240cd60b81e1ee1907030e
[..]
Common example of this behavior is when using mulitple AWS proxies such as API Gateway proxying to an elastic load balancer.
See #2102
When uvicorn is deployed behind more than one proxy, the proxy behavior is sometimes to list the protocol as a comma-separated list.
However, currently, uvicorn expects only one value for the x-forwarded-proto header, instead of parsing it as a list of values and setting the protocol accordingly.
x-forwarded-proto is a non-standard header, so there isn't a specification for its use, but different reverse-proxy vendors do use it in different ways, and some append the protocol as a comma-separated value from left-to-right (left being the furthermost proxy and rightmost being the closest).
Checklist