diff --git a/apps/web/app/config/route.ts b/apps/web/app/config/route.ts new file mode 100644 index 00000000..fd980f0c --- /dev/null +++ b/apps/web/app/config/route.ts @@ -0,0 +1,8 @@ +export const dynamic = "force-dynamic"; + +export function GET(request: Request, response: Response) { + return Response.json({ + posthog: process.env.POSTHOG_ID, + crisp: process.env.CRISP_ID, + }); +} diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index eb5d6394..86560032 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -17,41 +17,32 @@ export default async function RootLayout({ }: { children: React.ReactNode; }) { + const response = await fetch(`${process.env.AUTH_URL}/config`); + const result = await response.json(); return ( -