mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-22 04:29:05 +02:00
♻️ Force disable redirects when domain is missing attached resource domain
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user