View incoming request IP address

Is there any way to view the incoming HTTP request (post, etc.) ip address (or any other information) from the agent? I’d like to track who is controlling my imp (there are about 10 people who have access). I’d like to be able to see who is “messing” with everybody else.


Is the x-forwarded-for header what you’re after?

function onhttp(request, response) { response.send(200, format("hello %s", request.headers["x-forwarded-for"])); } http.onrequest(onhttp);

Yes! Thank you!!

So i’m inside a router, as well with my co-workers. So our IPs are all the same when I use “x-forwarded-for”. The agent can send a response back to my phone, so it knows “where” it is, and where to send the response.

Is there any way to dig deeper into the ip? port? I’m not a network guy, so IDK exactly…


You could add a custom header in the code that makes the HTTP request to the agent, then check it like this.

If all the traffic from your location goes through a NAT, then as far as our server knows it’s all from that address. There’s no way to distinguish (by IP address) who made the request.

To do that, you’d need to put more data in the request (which was different for each user).