Browse Source

fix: wont show auth popup when receiving a 401 http code

Yidadaa 1 year ago
parent
commit
600b1814a1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/client/api.ts

+ 1 - 0
app/client/api.ts

@@ -62,6 +62,7 @@ export function getHeaders() {
   const accessStore = useAccessStore.getState();
   let headers: Record<string, string> = {
     "Content-Type": "application/json",
+    "x-requested-with": "XMLHttpRequest",
   };
 
   const makeBearer = (token: string) => `Bearer ${token.trim()}`;