File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -2491,10 +2491,18 @@ data:
24912491
24922492 function buildBaseUrl() {
24932493 const raw = (process.env.RUM_FRONTEND_IP || '').trim();
2494- const base = raw ? (/^https?:\/\//i.test(raw) ? raw : `http://${raw}`) : 'http://localhost';
2495- return base.replace(/\/+$/, '') + '/';
2496- }
24972494
2495+ // If it's empty, default to localhost
2496+ if (!raw) return 'https://localhost/';
2497+
2498+ // If it already starts with http:// or https://, keep it exactly as-is
2499+ if (/^https?:\/\//i.test(raw)) {
2500+ return raw.replace(/\/+$/, '') + '/';
2501+ }
2502+
2503+ // Otherwise, prepend https://
2504+ return `https://${raw.replace(/\/+$/, '')}/`;
2505+ }
24982506 function delay(ms) { return new Promise(res => setTimeout(res, ms)); }
24992507
25002508 /** Wait until innerText of the page contains a substring */
You can’t perform that action at this time.
0 commit comments