granian
granian copied to clipboard
Process X-Forwarded-* headers
It would be great if granian could handle X-Forwarded headers for a smooth experience with reverse proxies without depending on a special setup or another dependency. Just declare your trusted proxies and you're good to go.
Here is how uvicorn handles these headers with its middleware which is baked into uvicorn: https://github.com/encode/uvicorn/blob/47304d9ae76321f0f5f649ff4f73e09b17085933/uvicorn/middleware/proxy_headers.py#L19