Reply
Member
Posts: 1
Registered: ‎10-28-2015

Sending X-Forwarded-For header from Magento?

We are using Magento 1.14.2.0, latest patches.  We're using the Authorize.net payment method. Our Magento servers are behind a load balancer.  All customers hitting our servers appear to be coming from the same IP address, the IP address of the load balancer.  We can pull the real customer IP address from the X-Forwarded-For header.  We use this to pull the customer IP address and add it to our invoices.  

 

When we've run some test orders we can see the real IP address coming in from the Internet useing the X-Forwarded-For header, but the IP address Authorize.net reports is the IP address of our load balancer.  

 

We plan on using the AFDS to help prevent fraud but we need to pass the customer's real IP address to Authorize. Anyone know what we need to do to pass the X-Forwarded-For header as the customer's IP address to Authorize.net?

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Sending X-Forwarded-For header from Magento?

There a customerIP fields for customer ip address

http://developer.authorize.net/api/reference/index.html