aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-02-05 12:29:37 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-02-05 12:29:37 +0000
commit838f95817002d036462f469d40513ce9ae837536 (patch)
treefb233ac87feec25de7b8024fa6a0b2fad9caf668
parent9d275f06c4089244c8de3a932724b983b4f4adc3 (diff)
downloadrspamd-838f95817002d036462f469d40513ce9ae837536.tar.gz
rspamd-838f95817002d036462f469d40513ce9ae837536.zip
[Fix] Fix usage of the Redis config schema as `extra_fields`
Issue: #4318
-rw-r--r--lualib/lua_redis.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/lualib/lua_redis.lua b/lualib/lua_redis.lua
index acbb46969..d41805eca 100644
--- a/lualib/lua_redis.lua
+++ b/lualib/lua_redis.lua
@@ -39,6 +39,13 @@ local common_schema = ts.shape {
}
local config_schema =
+ -- Allow separate read/write servers to allow usage in the `extra_fields`
+ ts.shape({
+ read_servers = ts.string + ts.array_of(ts.string),
+ }, {extra_fields = common_schema}) +
+ ts.shape({
+ write_servers = ts.string + ts.array_of(ts.string),
+ }, {extra_fields = common_schema}) +
ts.shape({
read_servers = ts.string + ts.array_of(ts.string),
write_servers = ts.string + ts.array_of(ts.string),