Fix jwt-token
This commit is contained in:
@@ -97,7 +97,9 @@ class MultiTenantAuth {
|
||||
}
|
||||
|
||||
// Method 6: URL path (/tenant2/api/...)
|
||||
const pathSegments = (req.path || req.url || '').split('/').filter(segment => segment);
|
||||
const urlPath = req.path || req.url || '';
|
||||
console.log('🏢 Raw urlPath value:', urlPath);
|
||||
const pathSegments = urlPath.split('/').filter(segment => segment);
|
||||
console.log('🏢 URL path segments:', pathSegments, 'from path:', req.path, 'or url:', req.url);
|
||||
if (pathSegments.length > 0 && pathSegments[0] !== 'api') {
|
||||
console.log('🏢 Tenant from URL path:', pathSegments[0]);
|
||||
|
||||
Reference in New Issue
Block a user