From 36ad4a3924ef58570eda1a19e03ec562298ed58a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 14 Jul 2018 10:37:28 +0100 Subject: [PATCH] [Minor] Fix custom keyword parsing --- src/plugins/lua/ratelimit.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index a84103ff9..7ab688ebf 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -443,9 +443,10 @@ local function ratelimit_cb(task) end for k, hdl in pairs(settings.custom_keywords or E) do - local ret, redis_key, bucket = pcall(hdl(task)) + local ret, redis_key, bd = pcall(hdl, task) if ret then + local bucket = parse_limit(k, bd) prefixes[redis_key] = make_prefix(redis_key, k, bucket) nprefixes = nprefixes + 1 else -- 2.39.5