Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SaigyoujiYuyuko233/72723f993406e5df4c9819f6b3b57b3f to your computer and use it in GitHub Desktop.
Save SaigyoujiYuyuko233/72723f993406e5df4c9819f6b3b57b3f to your computer and use it in GitHub Desktop.
Real IP behind CDN | Nginx in http
# in http
http{
map $http_x_forwarded_for $real_ip {
"" $remote_addr;
~^(?P<firstAddr>[0-9\.]+),?.*$ $firstAddr;
}
}
real ip: $real_ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment