Send x-tenant-id header from admin UI so controllers receive tenant
This commit is contained in:
@@ -203,6 +203,7 @@
|
|||||||
setStatus('Consultando ' + path + '...');
|
setStatus('Consultando ' + path + '...');
|
||||||
const headers = options.headers || {};
|
const headers = options.headers || {};
|
||||||
if (token.value) headers.Authorization = `Bearer ${token.value}`;
|
if (token.value) headers.Authorization = `Bearer ${token.value}`;
|
||||||
|
headers['x-tenant-id'] = tenantId.value || 'default';
|
||||||
const res = await fetch(`${apiRoot}${path}?tenantId=${encodeURIComponent(tenantId.value)}`, {
|
const res = await fetch(`${apiRoot}${path}?tenantId=${encodeURIComponent(tenantId.value)}`, {
|
||||||
...options,
|
...options,
|
||||||
headers,
|
headers,
|
||||||
|
|||||||
Reference in New Issue
Block a user