feat: allow http nopassword

This commit is contained in:
mouyong
2023-03-19 22:08:16 +08:00
parent 9b35082bc1
commit 068f7e4c65
2 changed files with 21 additions and 0 deletions

View File

@@ -480,3 +480,8 @@ pip3 install PyJWT flask
本地运行:`python3 app.py`运行后访问 `http://127.0.0.1:80`
服务器运行:部署后访问 `http://公网域名或IP:端口`
**允许无密码访问**
```
bash ./allow-http-nopassword.sh
```

16
allow-http-nopassword.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -x
# @see https://stackoverflow.com/questions/30003570/how-to-use-gnu-sed-on-mac-os-10-10-brew-install-default-names-no-longer-su
# @see https://www.cnblogs.com/fnlingnzb-learner/p/10657285.html
cmd=sed
if [ "$(uname)" == "Darwin" ];then
brew install gnu-sed
cmd=gsed
fi
echo "current sed command is: $cmd"
echo "allow http nopasword"
$cmd -i 's/"http_auth_password": "6.67428e-11"/"http_auth_password": ""/' config.json