Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
I tested below API by testing a Thing service.
Resources["CurrentSessionInfo"].GetCurrentIPAddress().
With below testing results, I assume this API returns IP received by Tomcat server?
I also tried tracking source code however have not found when and what kind of IP was set. Anyone could know the exact answer??
Solved! Go to Solution.
Hi Sushant, thanks for your comment. Actually this issue has been resolved with below results. Please take a ref.
1. By checking the coding, I found function <GetCurrentIPAddress> works as below.
2. I tested with Squid proxy server in 2 converse patterns.
This proxy production can adds or does not add XFF filed into HTTP header according to your configuration.
Below is Wikipedia explanation for XFF usage with Proxy server/Load Balancers, just FYI.
Hi Wenjing, i just tested this on ThingWorx 8.1 it is returning the ClientIP i.e. depending on where my mashup was accessed it picked up IP from that client. As per the source code it is suppose to return the client's IP.
Which ThingWorx version are you working with?
Hi Sushant, thanks for your comment. Actually this issue has been resolved with below results. Please take a ref.
1. By checking the coding, I found function <GetCurrentIPAddress> works as below.
2. I tested with Squid proxy server in 2 converse patterns.
This proxy production can adds or does not add XFF filed into HTTP header according to your configuration.
Below is Wikipedia explanation for XFF usage with Proxy server/Load Balancers, just FYI.
sorry I skipped your question, I tested with TWX 7.2.
Closed. Please Refer to Correct Answer for details.