Bypass Cache still using Cloudflare IPs

I am having an issue with our payment gateway wanting to validate IP’s addresses that are POSTing to a URL of ours. I have a rule to bypass the cache – pattern: I have also set Cloudflare to development mode to test hoping to bypass cache/proxy.

When looking at the logs, I see that the remote addr IP that is hitting the relevant URL is which is a Cloudflare IP, not the origin payment gateway’s IP. This causes the validation to break.

How do I ensure that Cloudflare passes the origin IP address to the URL?

Cloudflare passes the request’s IP address through the request headers:


Thanks @sdayman. For future PHP users:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.