π₯ π₯ π₯ A Free & Self-hostable Airtable Alternative
TypeScript airtableairtable-alternativeautomatic-apihacktoberfestlow-codeno-codeno-code-databaseno-code-platformpostgresqlrest-apirestful-apispreadsheetsqliteswagger
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.tsindex 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() || nullif (state.token.value && !config.headers['xc-short-token']) {config.headers['xc-auth'] = state.token.value