fix: treat local and wireguard sites as online for failover

This commit is contained in:
Fizza-Mukhtar
2026-03-01 07:56:47 -08:00
parent f36cf06e26
commit e63a6e9b77
2 changed files with 16 additions and 23 deletions

View File

@@ -665,7 +665,10 @@ export async function getTraefikConfig(
// TODO: HOW TO HANDLE ^^^^^^ BETTER
const anySitesOnline = targets.some(
(target) => target.site.online
(target) =>
target.site.online ||
target.site.type === "local" ||
target.site.type === "wireguard"
);
return (
@@ -679,11 +682,6 @@ export async function getTraefikConfig(
return false;
}
// Local sites don't report online status, always include them as fallback
if (target.site.type === "local") {
return true;
}
// If any sites are online, exclude offline sites
if (anySitesOnline && !target.site.online) {
return false;
@@ -798,7 +796,10 @@ export async function getTraefikConfig(
servers: (() => {
// Check if any sites are online
const anySitesOnline = targets.some(
(target) => target.site.online
(target) =>
target.site.online ||
target.site.type === "local" ||
target.site.type === "wireguard"
);
return targets
@@ -806,11 +807,6 @@ export async function getTraefikConfig(
if (!target.enabled) {
return false;
}
// Local sites don't report online status, always include them as fallback
if (target.site.type === "local") {
return true;
}
// If any sites are online, exclude offline sites
if (anySitesOnline && !target.site.online) {