Closed manuelluis closed 2 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
OK @manuelluis I have put a PR up to support this - but I think we need to be clear why Gitea needs to be aware of the proxy itself.
If gitea is behind a proxy like haproxy or nginx and we like to have the original ip in the gitea logs, we can use also the X-Forwarded-For
header if the connections are HTTP or the proxy handle the HTTPS connections.
But in the case of SSH connections or if gitea handle the HTTPS and we don't break the SSL in the proxy, with the proxy protocol we can have the original ip.
So I think my PR does do that IIRC
Support proxy protocol connections for HTTP/HTTPS and SSH, so we can have the originating ip in the gitea log if we are behind a proxy.
https://www.haproxy.com/blog/haproxy/proxy-protocol/