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

@@ -477,7 +477,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 (
@@ -491,10 +494,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;
@@ -609,7 +608,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
@@ -617,11 +619,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) {