From 7c5f165a4ff7d86c5594a5168ce027fd8afed4c7 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Wed, 20 Mar 2024 10:55:31 +0100 Subject: [PATCH] no authorizattion header if no token is present --- presenter/renderer/plugins/apollo.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presenter/renderer/plugins/apollo.ts b/presenter/renderer/plugins/apollo.ts index 9663f7b7b0..df8b296d1b 100644 --- a/presenter/renderer/plugins/apollo.ts +++ b/presenter/renderer/plugins/apollo.ts @@ -12,7 +12,7 @@ const createAuthLink = (getToken: () => string) => { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment headers: { ...headers, - authorization: token ? `Bearer ${token}` : '', + ...(token && { authorization: `Bearer ${token}` }), }, } })