Further revert

This commit is contained in:
Owen
2025-10-21 11:29:27 -07:00
parent e447549de1
commit 6fd6c77ce6
2 changed files with 7 additions and 4 deletions

View File

@@ -90,7 +90,11 @@ export async function getTraefikConfig(
eq(resources.enabled, true),
or(
eq(sites.exitNodeId, exitNodeId),
and(isNull(sites.exitNodeId), eq(sites.type, "local"))
and(
isNull(sites.exitNodeId),
sql`(${siteTypes.includes("local") ? 1 : 0} = 1)`, // only allow local sites if "local" is in siteTypes
eq(sites.type, "local")
)
),
or(
ne(targetHealthCheck.hcHealth, "unhealthy"), // Exclude unhealthy targets

View File

@@ -124,9 +124,8 @@ export async function getTraefikConfig(
or(
eq(sites.exitNodeId, exitNodeId),
and(
build != "saas" // so it runs in enterprise
? isNull(sites.exitNodeId)
: sql`0 = 1`,
isNull(sites.exitNodeId),
sql`(${siteTypes.includes("local") ? 1 : 0} = 1)`, // only allow local sites if "local" is in siteTypes
eq(sites.type, "local")
)
),