@budibase/backend-core 2.13.31 → 2.13.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -2
- package/dist/index.js.map +2 -2
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +4 -4
- package/dist/src/redis/redlockImpl.js.map +1 -1
- package/dist/src/tenancy/tenancy.js +11 -2
- package/dist/src/tenancy/tenancy.js.map +1 -1
- package/package.json +4 -4
- package/src/redis/redlockImpl.ts +1 -1
- package/src/tenancy/tenancy.ts +10 -2
package/dist/index.js
CHANGED
|
@@ -6229,9 +6229,16 @@ var getTenantIDFromCtx = (ctx, opts) => {
|
|
|
6229
6229
|
}
|
|
6230
6230
|
}
|
|
6231
6231
|
if (isAllowed("subdomain" /* SUBDOMAIN */)) {
|
|
6232
|
-
|
|
6232
|
+
let platformHost;
|
|
6233
|
+
try {
|
|
6234
|
+
platformHost = new URL(getPlatformURL()).host.split(":")[0];
|
|
6235
|
+
} catch (err) {
|
|
6236
|
+
if (err.code !== "ERR_INVALID_URL") {
|
|
6237
|
+
throw err;
|
|
6238
|
+
}
|
|
6239
|
+
}
|
|
6233
6240
|
const requestHost = ctx.host;
|
|
6234
|
-
if (requestHost.includes(platformHost)) {
|
|
6241
|
+
if (platformHost && requestHost.includes(platformHost)) {
|
|
6235
6242
|
const tenantId = requestHost.substring(
|
|
6236
6243
|
0,
|
|
6237
6244
|
requestHost.indexOf(`.${platformHost}`)
|