nit icon indicating copy to clipboard operation
nit copied to clipboard

nitcorn: add client IP in the HTTPRequest

Open privat opened this issue 9 years ago • 3 comments

There is a lot of information, but the not the IP. How can we geoip trace people?

privat avatar Jun 06 '16 20:06 privat

Would the data in HttpServer::remote_address do the trick?

I could copy it into the request... or provide a back link to the connection server, like in prepare_respon_and_close.

xymus avatar Jun 07 '16 14:06 xymus

Oh. I did not see it. I think that copying into the request object make sense as I looked into HTTPRequest where other (parsed) information is available.

privat avatar Jun 08 '16 01:06 privat

Importing nitcorn::log will log all of it for you, you can also redef prepare_respond_and_close in your Action to log it. But I'll take a look to move it in the request.

xymus avatar Jun 08 '16 13:06 xymus