How to store IP address of different logged in systems in Mendix?

Is there any way we can have Built-In Audit logs to track the document transaction details like Device IP address & Hostname, user details.   Thanks in advance
2 answers

Hi Sanjukta,


There is an old module call HttpCommons, which contains a couple of Java Actions (one is called getIP), which seems like you can extract the information you want.


How you would implement the audit trail, I would create a before-commit action on you user-specialization and check if your last login has changed. From there you can create the required entity that stores your desired values.


Hope it helps!


Be careful, you may endup getting IP address in your local machine but when you go to cloud or on-premise where your app could sit behind a reverse proxy, you may get the same IP address all time if the proxy rules doesnt forward the incoming IP to the mendix runtime. Meaning you have to more configuration on the server v/s local :)