aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamd_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-03-30 21:06:43 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-03-30 21:06:43 +0100
commitd231f3d467434e412160fa2d45dad8377a4f780e (patch)
treef56103f5bb5e13d25c4839ca8ddbaa2ab8df568c /src/rspamd_proxy.c
parent9e8950b9ec82af16706eba796ae315b61d6464c6 (diff)
downloadrspamd-d231f3d467434e412160fa2d45dad8377a4f780e.tar.gz
rspamd-d231f3d467434e412160fa2d45dad8377a4f780e.zip
[Minor] Check enabled/disabled logic for the proxy upstreams/mirrors
Diffstat (limited to 'src/rspamd_proxy.c')
-rw-r--r--src/rspamd_proxy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c
index 10f95e0bf..bdf3e1a14 100644
--- a/src/rspamd_proxy.c
+++ b/src/rspamd_proxy.c
@@ -334,6 +334,15 @@ rspamd_proxy_parse_upstream (rspamd_mempool_t *pool,
return FALSE;
}
+ if (!rspamd_config_is_enabled_from_ucl (pool, obj)) {
+ /* Upstream is valid but disabled */
+ msg_info_pool_check("upstream %s is disabled",
+ ucl_object_lookup (obj, "name") ?
+ ucl_object_tostring(ucl_object_lookup (obj, "name")) :
+ ucl_object_key (obj));
+ return TRUE;
+ }
+
up = rspamd_mempool_alloc0 (pool, sizeof (*up));
elt = ucl_object_lookup (obj, "name");