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

This commit is contained in:
Yidadaa 2023-05-20 23:58:36 +08:00
parent 76e6957a8a
commit 600b1814a1

View File

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