Skip to content

Commit

Permalink
fix: add Authorization header
Browse files Browse the repository at this point in the history
  • Loading branch information
hamo-o committed Aug 20, 2023
1 parent 391a635 commit b15dc39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/apis/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const defaultAxios: AxiosInstance = axios.create({
export const qFeedAxios: AxiosInstance = axios.create({
baseURL: process.env.NEXT_PUBLIC_BASE_URL,
headers: {
Authorization: `Bearer ${getCookie()}`,
"Content-Type": "application/json;charset=utf-8"
}
});
Expand Down Expand Up @@ -50,8 +51,9 @@ qFeedAxios.interceptors.response.use(
}
case 502:
case 503:
// window.location.href = "/";

{
// window.location.href = "/";
}
return Promise.reject(error);
}
}
Expand Down

0 comments on commit b15dc39

Please sign in to comment.