I have a setup that looks like this:
I’m unable to set Trusted IPs/Proxies in the BigCommerce application environment, therefore the client IP is always showing as the last connecting proxy instead of the client IP. Due to how ordering in BigCommerce is tracked, all orders are being marked as ‘potential fraud’ because of an IP location mismatch between the IP being logged and the customer making the order.
I’ve been asked what headers I’m sending via the Reverse proxy and it looks like this:
proxy_pass_header Set-Cookie; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
From what I can see and have been shown from the BigCommerce, the
X-Forwarded-For headers are being sent with the correct IPs in the correct order (
client_ip, proxy_ip), but
X-Real-IP shows as the
proxy_ip instead of the
Their suggestions have been to override the
X-Real-IP header from the Reverse Proxy and I can’t seem to be able to do so. From questions I’ve asked in other online communities, I’ve received suggestions on overriding the
proxy_bind, but that requires running Nginx as a superuser and messing with IP tables.
Is it possible that the droplet configuration (Possible NAT issue?) is what’s causing the IP to show as the
proxy_ip instead of the
client_ip or is what I have configured missing something crucial in my setup to ensure the reverse proxy doesn’t overwrite the
X-Real-IP with its own public IP address.
Any help or suggestions are greatly appreciated. I’ve also looked into
proxy_protocol, but I don’t know if that fits my situation and if that requires BigCommerce to support
proxy_protocol in order to correctly identify the
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!