diff --git a/packages/lib/api.ts b/packages/lib/api.ts index de9487ca..f2d13b47 100644 --- a/packages/lib/api.ts +++ b/packages/lib/api.ts @@ -254,6 +254,11 @@ export const $fetch = createFetch({ baseURL: `${process.env.NEXT_PUBLIC_BACKEND_URL ?? "https://api.supermemory.ai"}/v3`, credentials: "include", headers: { "X-App-Source": "nova" }, + onRequest: (context: { headers: Headers }) => { + if (!context.headers.has("X-App-Source")) { + context.headers.set("X-App-Source", "nova") + } + }, retry: { attempts: 3, delay: 100,