diff options
author | Andrew Lewis <nerf@judo.za.org> | 2018-01-04 13:41:46 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2018-01-04 13:41:46 +0200 |
commit | b33a7b88fe9b79f97b19a652781438d90ab1e5f6 (patch) | |
tree | 23b737153af15cb4f33651b06e2ab56b52a75358 /src | |
parent | a7dcf4ce8a5cd985117d51429bbc63a3935d37e8 (diff) | |
download | rspamd-b33a7b88fe9b79f97b19a652781438d90ab1e5f6.tar.gz rspamd-b33a7b88fe9b79f97b19a652781438d90ab1e5f6.zip |
[Feature] Multimap: template URL filter
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/multimap.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 252c592ff..60324fac1 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -210,6 +210,14 @@ local function apply_url_filter(task, filter, url, r) return nil end end + elseif string.find(filter, '^template:') then + if not r['template'] then + r['template'] = string.match(filter, '^template:(.+)') + end + + if r['template'] then + return lua_util.template(r['template'], url:to_table()) + end end return url:get_host() |