mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-15 01:11:58 +08:00
bugfix: checked the router.global_rules
first, it maybe nil. (#609)
This commit is contained in:
parent
d5f7b1e008
commit
a3b6a10fef
@ -240,7 +240,8 @@ function _M.http_access_phase()
|
||||
core.ctx.set_vars_meta(api_ctx)
|
||||
|
||||
-- load and run global rule
|
||||
if router.global_rules.values and #router.global_rules.values > 0 then
|
||||
if router.global_rules and router.global_rules.values
|
||||
and #router.global_rules.values > 0 then
|
||||
local plugins = core.tablepool.fetch("plugins", 32, 0)
|
||||
for _, global_rule in ipairs(router.global_rules.values) do
|
||||
api_ctx.conf_type = "global_rule"
|
||||
|
Loading…
Reference in New Issue
Block a user