From 5edc3820662c436dba09d11e6e468f259993a69c Mon Sep 17 00:00:00 2001 From: Victor Gerbrands Date: Tue, 26 Mar 2024 17:17:40 +0100 Subject: [PATCH] fix: reset auth headers if no token --- src/lib/data/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/data/index.ts b/src/lib/data/index.ts index 8cc0d3073..9e4a7afa7 100644 --- a/src/lib/data/index.ts +++ b/src/lib/data/index.ts @@ -44,6 +44,8 @@ const getMedusaHeaders = (tags: string[] = []) => { if (token) { headers.authorization = `Bearer ${token}` + } else { + headers.authorization = "" } return headers