mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29: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));
|
||||
console.warn("No config for this domain, falling back to default");
|
||||
|
||||
config = await get(edgeDomainToKey("default"));
|
||||
if (typeof config !== "object") {
|
||||
console.warn("No config for this domain, falling back to 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user