How to set HTTP header for Shopify to see end user's IP?

royzy
Visitor
1 0 0

We are an eCommerce web site acceleration solution. Part of our solution involves caching content and delivering them faster to the end users. To achieve this, we need to be a proxy layer in front of Shopify. The domain is CNAMEd to point to our accelerator. The configuration looks like:

 

# shopify.example.com is CNAMEd to point to us

End user visits shopify.example.com -> eCommerce Accelerator -> Shopify origin

 

When we send the request to Shopify origin, origin treats our server IP address as end users' IP address. Is there any HTTP header that we need to set to help Shopify see the end user's IP? Like "True-Client-IP".

 

Replies 2 (2)

Cedcommerce
Shopify Expert
718 76 112

Hello @royzy

 

Hope you are doing well! We are glad we can be of help to you.

You can use either X_FORWARDED_FOR or the X_REAL_IP in the header for passing the end user's IP address to Shopify origin.

 

All the best, 

CedCommerce

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
Benoît_f
Shopify Partner
1 0 0

Hi,

We have same problem in our accelerator solution. When a proxy is in front of shopify origin, customer's IP in order is the IP of proxy.
I tried to send real IP of customer in header (X_FORWARDED_FOR or the X_REAL_IP) but ip in order and anti-fraud system always Proxy IP.
Does it exist another Header to send the real Ip ?
Thanks for your help