There was an error while loading. Please reload this page.
1 parent 49df424 commit bfe5775Copy full SHA for bfe5775
2 files changed
src/api/axios.ts
@@ -5,6 +5,7 @@ export const API_BASE_URL = process.env.NEXT_PUBLIC_API_URL;
5
export const api = axios.create({
6
baseURL: API_BASE_URL,
7
withCredentials: true,
8
+ headers: { "X-Requested-With": "XMLHttpRequest" },
9
});
10
11
export const apiClient = api;
src/lib/auth/tokenStore.ts
@@ -95,7 +95,10 @@ export const tokenStore = {
95
const response = await fetch(`${API_URL}/api/auth/refresh`, {
96
method: "POST",
97
credentials: "include",
98
- headers: { "Content-Type": "application/json" },
+ headers: {
99
+ "Content-Type": "application/json",
100
+ "X-Requested-With": "XMLHttpRequest",
101
+ },
102
body: JSON.stringify(token ? { refreshToken: token } : {}),
103
104
0 commit comments