Skip to content

Commit 6fd6c77

Browse files
Further revert
1 parent e447549 commit 6fd6c77

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

server/lib/traefik/getTraefikConfig.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ export async function getTraefikConfig(
9090
eq(resources.enabled, true),
9191
or(
9292
eq(sites.exitNodeId, exitNodeId),
93-
and(isNull(sites.exitNodeId), eq(sites.type, "local"))
93+
and(
94+
isNull(sites.exitNodeId),
95+
sql`(${siteTypes.includes("local") ? 1 : 0} = 1)`, // only allow local sites if "local" is in siteTypes
96+
eq(sites.type, "local")
97+
)
9498
),
9599
or(
96100
ne(targetHealthCheck.hcHealth, "unhealthy"), // Exclude unhealthy targets

server/private/lib/traefik/getTraefikConfig.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,8 @@ export async function getTraefikConfig(
124124
or(
125125
eq(sites.exitNodeId, exitNodeId),
126126
and(
127-
build != "saas" // so it runs in enterprise
128-
? isNull(sites.exitNodeId)
129-
: sql`0 = 1`,
127+
isNull(sites.exitNodeId),
128+
sql`(${siteTypes.includes("local") ? 1 : 0} = 1)`, // only allow local sites if "local" is in siteTypes
130129
eq(sites.type, "local")
131130
)
132131
),

0 commit comments

Comments
 (0)