是否有通过WSGI网关接口(Apache)运行PyAMF时获取客户端的IP地址?
答案 0 :(得分:1)
它位于服务器请求处理程序中的密钥REMOTE_ADDR
下。例如,(来自Hello World脚本):
httpd = simple_server.WSGIServer(
('localhost', 8000),
simple_server.WSGIRequestHandler,
)
def app(environ, start_response):
# environ['REMOTE_ADDR'] is what you're looking for!
pass
httpd.set_app(app)