fix: correct enabled logic in geoblock merge and route injection

This commit is contained in:
fuomag9
2026-02-23 08:11:59 +01:00
parent 80177bf067
commit fd9aa986d9
+2 -2
View File
@@ -715,7 +715,7 @@ function mergeGeoBlockSettings(
host: GeoBlockSettings
): GeoBlockSettings {
return {
enabled: host.enabled,
enabled: host.enabled || global.enabled,
block_countries: [...(global.block_countries ?? []), ...(host.block_countries ?? [])],
block_continents: [...(global.block_continents ?? []), ...(host.block_continents ?? [])],
block_asns: [...(global.block_asns ?? []), ...(host.block_asns ?? [])],
@@ -843,7 +843,7 @@ async function buildProxyRoutes(
options.globalGeoBlock ?? null,
{ geoblock: meta.geoblock ?? null, geoblock_mode: meta.geoblock_mode ?? "merge" }
);
if (effectiveGeoBlock) {
if (effectiveGeoBlock?.enabled) {
handlers.unshift(buildBlockerHandler(effectiveGeoBlock));
}