From 0d9ddb69de682dab529feb96a1f4dc1d29cd0499 Mon Sep 17 00:00:00 2001 From: JohnDoe6345789 Date: Fri, 26 Dec 2025 05:29:23 +0000 Subject: [PATCH] code: nextjs,frontends,client (1 files) --- frontends/nextjs/src/lib/dbal/daemon/client.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontends/nextjs/src/lib/dbal/daemon/client.ts b/frontends/nextjs/src/lib/dbal/daemon/client.ts index 51d0027c6..1e1604018 100644 --- a/frontends/nextjs/src/lib/dbal/daemon/client.ts +++ b/frontends/nextjs/src/lib/dbal/daemon/client.ts @@ -11,9 +11,16 @@ export interface DaemonRpcRequest { } export async function callDaemon(request: DaemonRpcRequest): Promise { + const headers: Record = { + 'Content-Type': 'application/json', + } + if (process.env.DBAL_API_KEY) { + headers['x-dbal-api-key'] = process.env.DBAL_API_KEY + } + const response = await fetch(DEFAULT_DAEMON_URL, { method: 'POST', - headers: { 'Content-Type': 'application/json' }, + headers, body: JSON.stringify(request), })