Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 web.py 绑定到环回接口?
app = web.application(urls, globals())
当我以这种方式定义它并启动它时,它会侦听所有接口:
mit@mit1 $ python ./serve.py http://0.0.0.0:8080/
应该限制在 127.0.0.1
试试下面的命令...
python ./serve.py 127.0.0.1
它应该可以解决问题!
c:\work\web.py\test1>python code.py 127.0.0.1 http://127.0.0.1:8080/
你可以定义所有你想要的主机。只需在下面输入主机 IP