reddec / trusted-cgi

Lightweight runner for lambda functions/apps in CGI like mode
https://trusted-cgi.reddec.net
MIT License
228 stars 16 forks source link

Enhancement - Detecting Remote IP from behind reverse proxy #9

Closed c-nv-s closed 1 year ago

c-nv-s commented 3 years ago

If you have the trusted-cgi running behind a reverse proxy then the Remote IP address detected will be the internal IP address of the reverse proxy.

Is it possible to detect the client IP address using the Request Header Value e.g. X-Forwarded-For This is usually the header that the proxies pass on to the backend server so they are aware of the original client IP address.

c-nv-s commented 2 years ago

@reddec did you manage to progress this at all?

reddec commented 2 years ago

@c-nv-s Thanks for pinging! I am sorry but I didn't find free time for it yet. Just in case you will find a moment to do it by yourself, the PR should be trivial (except the new behavior should be enabled explicitly to avoid headers spoofing).

c-nv-s commented 2 years ago

@reddec re-pinging. Any chance you can revisit this request