Hello,
I’ve developed a Shopify app for my clients that relies on accurate IP addresses for affiliate tracking functionality. According to the Shopify documentation, I should be able to rely on the x-forwarded-for header to get the customer’s IP address.
My Setup:
-
Customer browsing store → Shopify App (hosted on Vercel) → Shopify App Proxy → My server
-
My server reads the
x-forwarded-forheader to identify the customer’s IP
The Problem: Starting about a month ago, the IP address I’m receiving from the x-forwarded-for header is no longer the customer’s actual IP. Instead, I’m getting an IP address that traces back to an AWS eu-central-1 server, which appears to be a Shopify infrastructure server.
Expected Behavior: The x-forwarded-for header should contain the original customer’s IP address (the person browsing the store).
Actual Behavior: The header contains what appears to be an internal Shopify server IP address instead.
Questions:
- Am I doing something wrong? My setup is fairly simple
- Is this a known issue, or an issue just to me
Any guidance would be greatly appreciated! Thanks in advance!