Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Jan 13, 2025
1 parent 1634e67 commit bda0503
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const clearFailedAuthRequestsQueue = (): void => {
failedAuthRequestQueue = [];
};

// We need to configure axios via interceptors because if the access token changes without a refresh the previous will
// still be used
fiaApi.interceptors.request.use(async (config) => {
config.baseURL = process.env.REACT_APP_FIA_REST_API_URL;
config.headers['Authorization'] = `Bearer ${!isDev ? localStorage.getItem('scigateway:token') : ''}`;
Expand Down

0 comments on commit bda0503

Please sign in to comment.