diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-02-21 17:32:10 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-02-21 17:32:10 +0000 |
commit | 269243987fcea4a6263390341da22dced06eabe0 (patch) | |
tree | 51975de478adcbca043de8de23a4fb868169c9b7 /src | |
parent | 23b730c272eaa94bd90d2f44c50b7025ff1c14c0 (diff) | |
download | rspamd-269243987fcea4a6263390341da22dced06eabe0.tar.gz rspamd-269243987fcea4a6263390341da22dced06eabe0.zip |
[Fix] Allow different template expansion parameters
Probably one of the most dirty hacks I've used in the Lua code in Rspamd...
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/history_redis.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua index f2554ef93..3365b30cd 100644 --- a/src/plugins/lua/history_redis.lua +++ b/src/plugins/lua/history_redis.lua @@ -149,7 +149,7 @@ local function history_save(task) end local data = task:get_protocol_reply { 'metrics', 'basic' } - local prefix = lua_util.jinja_template(settings.key_prefix, template_env) + local prefix = lua_util.jinja_template(settings.key_prefix, template_env, false, true) if data then normalise_results(data, task) @@ -183,7 +183,7 @@ local function history_save(task) end local function handle_history_request(task, conn, from, to, reset) - local prefix = lua_util.jinja_template(settings.key_prefix, template_env) + local prefix = lua_util.jinja_template(settings.key_prefix, template_env, false, true) if reset then local function redis_ltrim_cb(err, _) @@ -305,7 +305,7 @@ if opts then flags = 'empty,explicit_disable,ignore_passthrough', augmentations = { string.format("timeout=%f", redis_params.timeout or 0.0) } }) - lua_redis.register_prefix(lua_util.jinja_template(settings.key_prefix, template_env), N, + lua_redis.register_prefix(lua_util.jinja_template(settings.key_prefix, template_env, false, true), N, "Redis history", { type = 'list', }) |