diff --git a/composables/useConfig.ts b/composables/useConfig.ts index 2941b14..16d136a 100644 --- a/composables/useConfig.ts +++ b/composables/useConfig.ts @@ -1,5 +1,7 @@ export const useConfig = async () => { - let host = useRequestHeader("X-Forwarded-Host") ?? useRuntimeConfig().public.apiHost; + let host = + useRequestHeader("X-Forwarded-Host") ?? + useRuntimeConfig().public.apiHost; if (!host?.includes("http")) { // On server, this will be some kind of localhost @@ -13,7 +15,12 @@ export const useConfig = async () => { }); } - return await fetch(new URL("/api/_fe/config", host)).then((res) => + return { + http: { + url: host, + base_url: host, + }, + }; /* await fetch(new URL("/api/_fe/config", host)).then((res) => res.json(), - ); + ); */ };