Improve the demo feature of the project
This commit is contained in:
@@ -92,12 +92,16 @@ class ApiClient {
|
||||
|
||||
if (this.tenantId && !isPublicEndpoint) {
|
||||
config.headers['X-Tenant-ID'] = this.tenantId;
|
||||
console.log('🔍 [API Client] Adding X-Tenant-ID header:', this.tenantId, 'for URL:', config.url);
|
||||
} else if (!isPublicEndpoint) {
|
||||
console.warn('⚠️ [API Client] No tenant ID set for non-public endpoint:', config.url);
|
||||
}
|
||||
|
||||
// Check demo session ID from memory OR localStorage
|
||||
const demoSessionId = this.demoSessionId || localStorage.getItem('demo_session_id');
|
||||
if (demoSessionId) {
|
||||
config.headers['X-Demo-Session-Id'] = demoSessionId;
|
||||
console.log('🔍 [API Client] Adding X-Demo-Session-Id header:', demoSessionId);
|
||||
}
|
||||
|
||||
return config;
|
||||
|
||||
Reference in New Issue
Block a user