Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: skip socketId interceptor for internal apis.

DarkPhoenix2704e1b72a3dfeac
diff --git a/packages/nc-gui/composables/useApi/interceptors.ts b/packages/nc-gui/composables/useApi/interceptors.ts
index a8f4ee093f..ba028a5ed6 100644
--- a/packages/nc-gui/composables/useApi/interceptors.ts
+++ b/packages/nc-gui/composables/useApi/interceptors.ts
@@ -3,7 +3,7 @@ const DbNotFoundMsg = 'Database config not found'
const TIMEOUT_RETRY_COUNT = 1
-export function addAxiosInterceptors(api: Api<any>) {
+export function addAxiosInterceptors(api: Api<any>, skipSocket = false) {
const state = useGlobal()
const router = useRouter()
const route = router.currentRoute
@@ -14,7 +14,7 @@ export function addAxiosInterceptors(api: Api<any>) {
axiosInstance.interceptors.request.use((config) => {
config.headers['xc-gui'] = 'true'
- config.headers['xc-socket-id'] = $ncSocket?.id() || null
+ config.headers['xc-socket-id'] = skipSocket ? null : $ncSocket?.id() || null
if (state.token.value && !config.headers['xc-short-token']) {
config.headers['xc-auth'] = state.token.value