mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
www: fix edge config to go on default by default
This commit is contained in:
@@ -39,11 +39,13 @@ export async function getConfig(domain: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let config = await get(edgeDomainToKey(domain));
|
let config = await get(edgeDomainToKey(domain));
|
||||||
|
|
||||||
|
if (typeof config !== "object") {
|
||||||
console.warn("No config for this domain, falling back to default");
|
console.warn("No config for this domain, falling back to default");
|
||||||
|
|
||||||
config = await get(edgeDomainToKey("default"));
|
config = await get(edgeDomainToKey("default"));
|
||||||
|
}
|
||||||
|
|
||||||
if (typeof config !== "object") throw Error("Error fetchig config");
|
if (typeof config !== "object") throw Error("Error fetching config");
|
||||||
|
|
||||||
return config as DomainConfig;
|
return config as DomainConfig;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user