Minor refactor for the ret_code parsing

This commit is contained in:
alteredCoder 2022-03-31 17:22:09 +02:00
parent 57bfc35500
commit 4f2c35ca91

View file

@ -20,10 +20,9 @@ function M.new(template_path, redirect_location, ret_code)
break
end
end
end
if ret_code_ok == false and ret_code ~= 0 and ret_code ~= "" then
ngx.log(ngx.ERR, "RET_CODE '" .. ret_code .. "' is not supported, using default HTTP code " .. M.ret_code)
if ret_code_ok == false then
ngx.log(ngx.ERR, "RET_CODE '" .. ret_code .. "' is not supported, using default HTTP code " .. M.ret_code)
end
end
template_file_ok = false