-
In my app logs, I'm only presented with Docker's internal IP addresses, such as
172.18.0.1
and not ever end users' IPs. This poses various problems for me in maintaining app instances. I know this to be the issue with at least Matrix and Gitea.Can this be solved so that real external IPs are shown?
-
For the app behind the proxy, the reverse proxy sets various headers to preserve that info: https://git.cloudron.io/cloudron/box/-/blob/master/src/nginxconfig.ejs#L153
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For
-
-
If you use apache in your app, you can put something like this in the config:
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy CustomLog "|/bin/cat" proxy ErrorLog "|/bin/cat"
-
-
-
-
-