Commit 2dc7c6c2 by Joneq

修改代码

parent d67fc4fa
Showing with 8 additions and 6 deletions
...@@ -48,20 +48,22 @@ if not ok then ...@@ -48,20 +48,22 @@ if not ok then
end end
if config.redis_auth ~= "" then if config.redis_auth ~= "" then
ok, err = red:auth(config.redis_auth) local ok, err = red:auth(config.redis_auth)
end
-- 如果连接失败,跳转到label处 -- 如果连接失败,跳转到label处
if not ok then if not ok then
ngx.say("failed to connect: ", err) ngx.say("failed to connect: ", err)
ngx.exit(ngx.HTTP_FORBIDDEN) ngx.exit(ngx.HTTP_FORBIDDEN)
return return
end
end end
--防火墙开关 --防火墙开关
spider_config_button , err = red:get('spider_config_button') spider_config_button , err = red:get('spider_config_button')
if spider_config_button ~= ngx.null and tonumber(spider_config_button)==1 then if spider_config_button ~= ngx.null and tonumber(spider_config_button)==1 then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment