Skip to content

Instantly share code, notes, and snippets.

@zhanglianxin
Created April 14, 2022 15:44
Show Gist options
  • Save zhanglianxin/12cefffbec235ba2fee12a95629a96ec to your computer and use it in GitHub Desktop.
Save zhanglianxin/12cefffbec235ba2fee12a95629a96ec to your computer and use it in GitHub Desktop.
Restore client real IP
real_ip_header X-Forwarded-For;
set_real_ip_from 0.0.0.0/0;
set_real_ip_from 2400:cb00::/32;
set_real_ip_from 2606:4700::/32;
set_real_ip_from 2803:f800::/32;
set_real_ip_from 2405:b500::/32;
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2c0f:f248::/32;
set_real_ip_from 2a06:98c0::/29;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment