From 3ad79cccea2c260cba28a2d41ac53f9a2249b4b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E6=B3=BD=E8=BD=A9?= Date: Thu, 14 May 2020 17:47:09 +0800 Subject: [PATCH] chore: fix function name typo in ip-restriction (#1586) --- apisix/plugins/ip-restriction.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apisix/plugins/ip-restriction.lua b/apisix/plugins/ip-restriction.lua index ab4deed3..f08c9c7c 100644 --- a/apisix/plugins/ip-restriction.lua +++ b/apisix/plugins/ip-restriction.lua @@ -110,7 +110,7 @@ function _M.check_schema(conf) end -local function create_ip_mather(ip_list) +local function create_ip_matcher(ip_list) local ip, err = ipmatcher.new(ip_list) if not ip then core.log.error("failed to create ip matcher: ", err, @@ -128,7 +128,7 @@ function _M.access(conf, ctx) if conf.blacklist and #conf.blacklist > 0 then local matcher = lrucache(conf.blacklist, nil, - create_ip_mather, conf.blacklist) + create_ip_matcher, conf.blacklist) if matcher then block = matcher:match(remote_addr) end @@ -136,7 +136,7 @@ function _M.access(conf, ctx) if conf.whitelist and #conf.whitelist > 0 then local matcher = lrucache(conf.whitelist, nil, - create_ip_mather, conf.whitelist) + create_ip_matcher, conf.whitelist) if matcher then block = not matcher:match(remote_addr) end