improve code

This commit is contained in:
he2ss 2022-02-08 17:44:41 +01:00
parent c1ec091034
commit 7a6e1912f7

View file

@ -9,6 +9,9 @@ M.ret_code = ngx.HTTP_FORBIDDEN
function M.new(template_path, redirect_location, ret_code) function M.new(template_path, redirect_location, ret_code)
if template_path == nil then
return "ban template file variable is empty, will ban without template"
end
if utils.file_exist(template_path) == false then if utils.file_exist(template_path) == false then
return "ban template file doesn't exist, will ban without template" return "ban template file doesn't exist, will ban without template"
else else