servertap icon indicating copy to clipboard operation
servertap copied to clipboard

Request: Log IP of the requests originated from

Open aaira-a opened this issue 2 years ago • 3 comments

Is it possible to add IPs to the debug log?

aaira-a avatar Oct 28 '23 18:10 aaira-a

What do you mean? Which log messages?

phybros avatar Oct 31 '23 00:10 phybros

Background: We are using ServerTap on a multiplayer server. More than one clients are calling the v1/server/exec endpoint, with the shared secret.

In example here, if we turn on debug: true in ServerTap config, there is an INFO line logged, showing that the v1/server/exec endpoint was called.

Actual log in my console: 31.10 03:32:18 [Server] INFO /v1/server/exec. My question is whether it is possible to add the caller's IP to this line for tracing the source.

Another extension to this is to actually log the request body of the request itself for security/audit purposes, but I feel that logging IP should be enough for now.

aaira-a avatar Oct 31 '23 03:10 aaira-a

If this is added, the X-Forwarded-For header should be supported for this to avoid the logs only returning the IP address of the reverse proxy sitting in front of ServerTap (if any).

MeesJ avatar May 08 '24 15:05 MeesJ