RopeWiki / app

Infrastructure for automated RopeWiki site creation
Apache License 2.0
4 stars 3 forks source link

Tweak/client ip logs #64

Closed hcooper closed 1 year ago

hcooper commented 1 year ago

This logs the visitor's actual IP logged by the webserver nginx.

75.172.125.37 172.19.0.6 - - [25/Jul/2023:22:05:55 +0000] "GET /Davis_Creek_Canyon HTTP/1.0" 200 84891 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"

The first IP is that stored in the X_FORWARDED_FOR http header by the reverse proxy. The second is the IP of the TCP connection (i.e. the reverse proxy itself).

Local requests (e.g. from scripts etc) will look like this:

- 127.0.0.1 - - [25/Jul/2023:22:07:44 +0000] "POST /index.php?title=Special%3ARunJobs&tasks=jobs&maxjobs=1&sigexpiry=1690322 HTTP/1.1" 202 5 "-" "-"
hcooper commented 1 year ago

Abandoning this in favor of using the reverse proxy logs as the source of trust.