Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I capture user's IP Address (or other client details) for an unauthenticated page?

user9930026Apr 27 2017 — edited Apr 28 2017

How can I capture user's IP Address (or other client details) for an unauthenticated page?

I have a number of unauthenticated APEX forms/pages.  I need to find out some identifiers from the client side to be able to analyze where most of the traffic is coming form and if the form entries are done by the same or just a limited number of users.  I need some metadata (IP Address/Server Name, ...).

There are some APEX Views that exposes such information for developers, but I don't know of any built-in feature that would do that for all users. 

For example in APEX > Application Builder > Application > Utilities > Application Express Views > APEX_WORKSPACE_ACCESS_LOG you can see IP_ADDRESS as one of the columns that could be selected, but this will not show any information related to the users, just developer logins.  Is there another view I don't know about?

I could use some JavaScript to capture IP address of the user and write it back to my session, but there is an inherent problem here as the users are accessing the APEX page from their network, any many will have IP addresses such as 192.168.X.Y which is not going to help at all.

Also doing this from the backend using solutions like:  "SELECT sys_context('userenv','ip_address') FROM dual;" (plsql - How to obtain Local IP Address of PC within Oracle ApEx - Stack Overflow ) is also not useful as the clients are hitting APEX/database using Apache>Tomcat>database so the client to the database is always going to be Tomcat Server (although I haven't tested this yet).

I have already looked at this: Get Client IP in Apex 5.0 But I don't see this helpful either.

I can't think of any other solution.  Any ideas? Anyone else had to deal with this already?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2017
Added on Apr 27 2017
3 comments
3,214 views