rocarly25 Posted September 14, 2016 Share Posted September 14, 2016 We are using Incapsula as security CDN in our website. In new orders we are getting IP address from Incapsula instead of user IP. I already have a code that get real user IP but I'm not sure where should I put the value when creating a new order. I tried adding a hidden input in checkout form as ipaddress but it doesn't work. Any idea on how to get user real ip address in new orders instead of CDN ip addresses? Thanks in advance, CArlos 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 17, 2016 Share Posted September 17, 2016 what is your code look like? is it PHP or JS? 0 Quote Link to comment Share on other sites More sharing options...
rocarly25 Posted September 20, 2016 Author Share Posted September 20, 2016 Hi sentq, The code I'm using is PHP: $_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_INCAP_CLIENT_IP"] ? $_SERVER["HTTP_INCAP_CLIENT_IP"] : $_SERVER["REMOTE_ADDR"]; I'm getting the real IP address in $_SERVER['REMOTE_ADDR'] but new orders are still coming with Incapsula's IPs. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 20, 2016 Share Posted September 20, 2016 Hi, maybe you could use this ActionHook point to save/override client IP in tblorders in database 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 20, 2016 Share Posted September 20, 2016 another solution (tested) is add your code inside configuration.php this should work 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.