mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
fix non-dev
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import { get } from "@vercel/edge-config";
|
import { get } from "@vercel/edge-config";
|
||||||
import { isDevelopment } from "./utils";
|
import { isDevelopment } from "./utils";
|
||||||
import { localConfig } from "../../config";
|
|
||||||
|
|
||||||
type EdgeConfig = {
|
type EdgeConfig = {
|
||||||
[domainWithDash: string]: {
|
[domainWithDash: string]: {
|
||||||
@@ -32,7 +31,7 @@ export function edgeDomainToKey(domain: string) {
|
|||||||
// get edge config server-side (prefer DomainContext when available), domain is the hostname
|
// get edge config server-side (prefer DomainContext when available), domain is the hostname
|
||||||
export async function getConfig(domain: string) {
|
export async function getConfig(domain: string) {
|
||||||
if (isDevelopment()) {
|
if (isDevelopment()) {
|
||||||
return localConfig;
|
return require("../../config").localConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
let config = await get(edgeDomainToKey(domain));
|
let config = await get(edgeDomainToKey(domain));
|
||||||
|
|||||||
Reference in New Issue
Block a user