HTTP remote variables

Hi,

Is there any way to get information about the remote end of an HTTP connection? The remote IP address in particular?

What, in an agent’s http.onrequest() handler? Here’s a piece of agent code that prints out all the supplied headers:

http.onrequest(function(req,res) { foreach (k,v in req.headers) { server.log(k+": "+v); } res.send(200, "OK"); });
You’ll find that “x-forwarded-for” is the remote end’s IP address.

Peter