diff --git a/README.md b/README.md index d4c91ca..6d3c026 100644 --- a/README.md +++ b/README.md @@ -480,3 +480,8 @@ pip3 install PyJWT flask 本地运行:`python3 app.py`运行后访问 `http://127.0.0.1:80` 服务器运行:部署后访问 `http://公网域名或IP:端口` + +**允许无密码访问** +``` +bash ./allow-http-nopassword.sh +``` diff --git a/allow-http-nopassword.sh b/allow-http-nopassword.sh new file mode 100644 index 0000000..b0066c4 --- /dev/null +++ b/allow-http-nopassword.sh @@ -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