improve code
This commit is contained in:
parent
c1ec091034
commit
7a6e1912f7
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,9 @@ M.ret_code = ngx.HTTP_FORBIDDEN
|
|||
|
||||
|
||||
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
|
||||
return "ban template file doesn't exist, will ban without template"
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue