From f271accfea0454b965abc8b9b7e9bb5d55d72053 Mon Sep 17 00:00:00 2001 From: Stojan Dimitrovski Date: Thu, 19 Dec 2024 10:54:59 +0100 Subject: [PATCH] fix: add `create*Client` string in `x-client-info` (#85) A tiny change that lets Supabase team track usage of `createServerClient` and `createBrowserClient` separately across requests. --- src/createBrowserClient.ts | 2 +- src/createServerClient.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/createBrowserClient.ts b/src/createBrowserClient.ts index a7ac3bb..2cfdba6 100644 --- a/src/createBrowserClient.ts +++ b/src/createBrowserClient.ts @@ -127,7 +127,7 @@ export function createBrowserClient< ...options?.global, headers: { ...options?.global?.headers, - "X-Client-Info": `supabase-ssr/${VERSION}`, + "X-Client-Info": `supabase-ssr/${VERSION} createBrowserClient`, }, }, auth: { diff --git a/src/createServerClient.ts b/src/createServerClient.ts index c4f3d6a..796cc10 100644 --- a/src/createServerClient.ts +++ b/src/createServerClient.ts @@ -159,7 +159,7 @@ export function createServerClient< ...options?.global, headers: { ...options?.global?.headers, - "X-Client-Info": `supabase-ssr/${VERSION}`, + "X-Client-Info": `supabase-ssr/${VERSION} createServerClient`, }, }, auth: {