♻️ Force disable redirects when domain is missing attached resource domain

This commit is contained in:
Fred KISSIE
2026-09-23 20:49:45 +02:00
parent ca18320ca3
commit 14fda9cec0
4 changed files with 74 additions and 62 deletions
+8 -1
View File
@@ -20,6 +20,7 @@ import {
inArray,
isNotNull,
isNull,
not,
or,
sql
} from "drizzle-orm";
@@ -367,7 +368,13 @@ export async function getTraefikConfig(
.where(
and(
eq(redirects.enabled, true),
or(isNull(redirects.resourceId), eq(resources.enabled, true))
or(
isNull(redirects.resourceId),
and(
eq(resources.enabled, true),
not(isNull(resources.domainId))
)
)
)
)
.orderBy(desc(redirects.priority), redirects.redirectId); // stable ordering