使用simplehttpserver进行基本身份验证

时间:2017-03-11 15:00:17

标签: authentication simplehttpserver

是否可以使用simplehttpserver添加基本身份验证?

我想使用SimpleHTTPServer

限制对网站的访问

2 个答案:

答案 0 :(得分:3)

由于这个原因,我最近写了sauth。它只是人性化且适当打包的https://github.com/tianhuil/SimpleHTTPAuthServer版本,支持python3。

试一试:

~$ pip install sauth
~$ cd some_dir
~/some_dir $ sauth admin 12345 
Serving "/home/user/some_dir" directory on http://0.0.0.0:8333

答案 1 :(得分:0)

相关问题