Get IP adresse of the browser who do the HTTP Request to an agent

I’m not sure how to explain what I want :

Let say my IMP is called “Door”

and …someone in China want to see the page generated by the Agent of “Door”. he will go to the link
https://agent.electricimp.com/xxxxxxxxxxxxxx
where xxxxxxxxxxxxxx is the URL of “Door”

Is it possible for my agent to know what is the IP adress of the computer/device that went to https://agent.electricimp.com/xxxxxxxxxxxxxx

thanks

Try the ‘x-forwarded-for’ header:

`http.onrequest(function(req, resp) {
  server.log(req.headers["x-forwarded-for"]);
  resp.send(200, "OK");
});`

is it possible for the Agent to know the WAN IP of the device ?

Right now, no. This is not exposed.

Is it going to be exposed at some point, it will unlock all kind of possibilities

Very likely it will become a feature, but currently no commercial customers requesting this so it hasn’t been a priority.