diff --git a/ss_whitelist/config/nginx.conf b/ss_whitelist/config/nginx.conf index fd8e143..229b40d 100644 --- a/ss_whitelist/config/nginx.conf +++ b/ss_whitelist/config/nginx.conf @@ -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")