ss_whitelist V1.0.2

[fix] 修复IP列表清空遗留问题
pull/412/head
wulabing 2022-06-19 22:46:46 +08:00
parent 3129bcce57
commit 23d4b0e7bd
No known key found for this signature in database
GPG Key ID: 213391AFDF73AE00
1 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ http {
server{
listen 80;
listen [::]:80 ipv6only=on;
location / {
location = / {
auth_basic "";
auth_basic_user_file /etc/openresty/auth;
add_header Content-Type text/plain;
@ -121,7 +121,7 @@ http {
add_header Content-Type text/plain;
content_by_lua_block {
ngx.header.content_type = "text/plain;charset=UTF-8";
file = io.open("/etc/openresty/allow.list","w")
file = io.open("/etc/openresty/allow.list","w+")
ngx.print("IP列表已被清空")
io.close(file)
os.execute("/usr/local/openresty/nginx/sbin/nginx -s reload")