Restore IP addresses of incomming requests

My payment gateway sends a request to my rest api when a payment is successful. I’ve a ip whitelist on my rest api but since I’m using Cloudflare the ip addresses of my payment gateway provider changes. I’ve read about the mod_Cloudflare to restore the changed IP addresses but I can only find a version for apache, I’m using nginx. Are there other options to restore the real ip address so I can use the whitelist again?

You’ll need the ngx_http_realip_module module to change the client address with Nginx.

You can read the setup instructions here:

https://support.cloudflare.com/hc/en-us/articles/200170706-How-do-I-restore-original-visitor-IP-with-Nginx-

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