From 600b1814a1b982e6faca151afff0518b15884c79 Mon Sep 17 00:00:00 2001 From: Yidadaa Date: Sat, 20 May 2023 23:58:36 +0800 Subject: [PATCH] fix: wont show auth popup when receiving a 401 http code --- app/client/api.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/client/api.ts b/app/client/api.ts index c76fab57..a966d733 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -62,6 +62,7 @@ export function getHeaders() { const accessStore = useAccessStore.getState(); let headers: Record = { "Content-Type": "application/json", + "x-requested-with": "XMLHttpRequest", }; const makeBearer = (token: string) => `Bearer ${token.trim()}`;