Rad*_*Hex 12 python django ubuntu nginx gevent
我正在localhost中运行服务 127.0.01:8000
我通过使用代理这个:
proxy_pass http://127.0.0.1:8000;
Run Code Online (Sandbox Code Playgroud)
问题是我需要将用户的IP地址传递给服务.
有任何想法吗?
Yuj*_*ita 20
我通过设置自定义标头将真实IP发送到django:
proxy_set_header X-Real-IP $remote_addr;
这些标题可用于 request.META
| 归档时间: |
|
| 查看次数: |
9777 次 |
| 最近记录: |