Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
google translate says
If you use a the nginx proxy running web.py to use web.ctx.ip get the wrong IP = 127.0.0.1 web.ctx.ip, how to get the correct IP, in fact, nginx in the proxy ip address it written into the header, but the name is not X-Real-IP, but HTTP_X_REAL_IP, automatically add http at the beginning, so, we can be to get the real IP address web.ctx.env.get (' HTTP_X_REAL_IP, web.ctx.ip), so that is the real IP.