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), eq(resources.enabled, true),
or( or(
eq(sites.exitNodeId, exitNodeId), 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( or(
ne(targetHealthCheck.hcHealth, "unhealthy"), // Exclude unhealthy targets ne(targetHealthCheck.hcHealth, "unhealthy"), // Exclude unhealthy targets

View File

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