granian icon indicating copy to clipboard operation
granian copied to clipboard

Process X-Forwarded-* headers

Open jvllmr opened this issue 6 months ago • 5 comments

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

jvllmr avatar Aug 26 '24 09:08 jvllmr