diff options
author | Sunil Shetye | 2025-03-12 13:21:13 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-03-12 13:21:13 +0530 |
commit | dc2ce4eeaf8704f4cf4bc7603cfd898edbe25254 (patch) | |
tree | 2145469c7372989634736c5eb5481a6826bf6237 | |
parent | ff0ee3ae99708eaf6f8db8361423cc32a974db34 (diff) | |
download | Common-Interface-Project-dc2ce4eeaf8704f4cf4bc7603cfd898edbe25254.tar.gz Common-Interface-Project-dc2ce4eeaf8704f4cf4bc7603cfd898edbe25254.tar.bz2 Common-Interface-Project-dc2ce4eeaf8704f4cf4bc7603cfd898edbe25254.zip |
avoid infinite loop while refreshing
-rw-r--r-- | blocks/eda-frontend/src/utils/Api.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/blocks/eda-frontend/src/utils/Api.js b/blocks/eda-frontend/src/utils/Api.js index 307565e9..bcc6e9cc 100644 --- a/blocks/eda-frontend/src/utils/Api.js +++ b/blocks/eda-frontend/src/utils/Api.js @@ -60,6 +60,11 @@ const refreshSession = async () => { } api.interceptors.request.use(async (config) => { + // Avoid infinite loop by skipping the interceptor for session refresh requests + if (config.url.includes('simulation/get_session')) { + return config + } + let sessionId = localStorage.getItem('session_id') // Check if session is expired and refresh if necessary |