开发者

log incoming ip addresses in web.py

开发者 https://www.devze.com 2023-02-17 19:03 出处:网络
I\'d like to log the IP addresses of machines that access my web.py application.How can I access this data within the web.py framework?I\'m happy t开发者_如何学Co send the address to my own logger.Use

I'd like to log the IP addresses of machines that access my web.py application. How can I access this data within the web.py framework? I'm happy t开发者_如何学Co send the address to my own logger.


Use web.ctx['ip'] to get the remote ip address. Here is a link which explains what's in the context.

0

精彩评论

暂无评论...
验证码 换一张
取 消