My nginx backend server should only accept requests from my frontend, 22.214.171.124. However, I also want nginx to log the correct IP address, so I use
set_real_ip_from. But by doing this, the
allow rule in the config isn't matched, and nginx will always return a 403. Here's the relevant config:
allow 126.96.36.199; deny all; set_real_ip_from 188.8.131.52; real_ip_heaader X-Real-IP;
How can I overcome this problem?