@burdenoff/website-sdk 2026.517.2 → 2026.517.3
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/client/index.d.mts +5 -2
- package/dist/client/index.d.ts +5 -2
- package/dist/client/index.js +10 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +10 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -211,17 +211,25 @@ function isAlphaHost(hostname) {
|
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
213
|
function resolveGatewayUrl(explicitUrl) {
|
|
214
|
-
if (explicitUrl && !isLocalhostUrl(explicitUrl)) {
|
|
214
|
+
if (explicitUrl && isAbsoluteUrl(explicitUrl) && !isLocalhostUrl(explicitUrl)) {
|
|
215
215
|
return explicitUrl;
|
|
216
216
|
}
|
|
217
217
|
if (typeof window === "undefined") {
|
|
218
|
-
return explicitUrl
|
|
218
|
+
return explicitUrl && isAbsoluteUrl(explicitUrl) ? explicitUrl : getLocalFallback();
|
|
219
219
|
}
|
|
220
220
|
const hostname = window.location.hostname.toLowerCase();
|
|
221
221
|
if (isProductionHost(hostname)) return PROD_GATEWAY;
|
|
222
222
|
if (isAlphaHost(hostname)) return ALPHA_GATEWAY;
|
|
223
223
|
return getLocalFallback();
|
|
224
224
|
}
|
|
225
|
+
function isAbsoluteUrl(url) {
|
|
226
|
+
try {
|
|
227
|
+
new URL(url);
|
|
228
|
+
return true;
|
|
229
|
+
} catch {
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
225
233
|
function isLocalhostUrl(url) {
|
|
226
234
|
try {
|
|
227
235
|
const parsed = new URL(url);
|