Created
July 1, 2019 07:50
-
-
Save SaigyoujiYuyuko233/72723f993406e5df4c9819f6b3b57b3f to your computer and use it in GitHub Desktop.
Real IP behind CDN | Nginx in http
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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