forked from XiaoMo/ChatGPT-Next-Web
fix: wont show auth popup when receiving a 401 http code
This commit is contained in:
parent
76e6957a8a
commit
600b1814a1
@ -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()}`;
|
||||||
|
Loading…
Reference in New Issue
Block a user