pgjones / hypercorn

Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for PROXY-Protocol

apollo13 opened this issue · comments

It would be great if hypercorn could support the proxy protocol (https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). This is generally a good alternative to the x-forward-* headers. Would this be something that you'd be willing to add to hypercorn?

I think this would work as another mode to the ProxyFixMiddleware?

I fear not. The PROXY protcol works below HTTP basically. So you'd have metadata sent when the TCP Connection is opened and only then you have the usual HTTP stuff.