You are not logged in.
Pages: 1
Hi.
I need to know the client's IP address. Where to look for?
Thank you.
Offline
Can't find this information in documentation. How can a mORMot http server know the client's IP address?
Last edited by Junior/RO (2012-03-29 15:11:48)
Offline
I don't think this is possible.
Offline
There is no standard way of doing this.
From the mORMot point of view, this is a RESTful architecture, which does not know anything about IP (or even HTTP). It can even be accessed locally via GDI messages or via in-process (in a dll).
For the HTTP communication, it will depend on the server implementation class.
There is no such information provided by now from the framework to the process event.
With the HTTP kernel server, you can use Req^.Address.pRemoteAddress^ in procedure THttpApiServer.Execute to retrieve the IP.
Offline
OK - I've modified both server classes (both WinSock based and http.sys based).
In fact, a new header 'RemoteIP: 127.0.0.1' has been added to retrieve the remote IP address in HTTP headers on server side.
Offline
Thank you. I will try...
Ops... server don't run anymore. Hmm... you updated the sqlite3 engine.
Solution: update sqlite3*.obj files. Now it works again!
Offline
Pages: 1