Skip to content

Commit

Permalink
fix: axios interceptor testing
Browse files Browse the repository at this point in the history
  • Loading branch information
varun2948 committed Feb 13, 2024
1 parent 06b6330 commit 058ca2b
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,7 @@ console.error = function filterWarnings(msg, ...args) {
consoleError(msg, ...args);
}
};
axios.interceptors.request.use(
(config) => {
// Do something before request is sent

// const excludedDomains = ['xxx', 'xxx'];
// const urlIsExcluded = excludedDomains.some((domain) => config.url.includes(domain));
// if (!urlIsExcluded) {
// config.withCredentials = true;
// }

config.withCredentials = true;

return config;
},
(error) =>
// Do something with request error
Promise.reject(error),
);

const GlobalInit = () => {
useEffect(() => {
console.log('adding interceptors');
Expand Down

0 comments on commit 058ca2b

Please sign in to comment.