]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Feature] url_redirector: switch redirector_hosts_map from set to glob
authorDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Fri, 22 May 2026 19:56:20 +0000 (21:56 +0200)
committerDmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
Fri, 22 May 2026 19:56:20 +0000 (21:56 +0200)
Allow operators to use glob patterns (e.g. *.bit.ly, *.t.co) in the
redirector hosts list. Bare hostnames continue to match exactly, so no
operational change for existing maps; only the option to use wildcards
is new.

Signed-off-by: Dmitriy Alekseev <1865999+dragoangel@users.noreply.github.com>
src/plugins/lua/url_redirector.lua

index 800e7024f1cbc3b69a0fc4575fa92d3ea08ab5c6..0377b226d17445cca4148fd1b31110265497715f 100644 (file)
@@ -950,7 +950,7 @@ if opts then
     else
       local lua_maps = require "lua_maps"
       settings.redirector_hosts_map = lua_maps.map_add_from_ucl(settings.redirector_hosts_map,
-          'set', 'Redirectors definitions')
+          'glob', 'Redirectors definitions (glob: bare names match exactly, *.foo matches subs)')
 
       if settings.redirector_get_urls_map then
         settings.redirector_get_urls_map = lua_maps.map_add_from_ucl(