Skip to content

Commit 59b674d

Browse files
committed
Merge branch 'fix-sub-url-query'
2 parents b25675e + 045a0ba commit 59b674d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/ui.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,12 @@ const UI = {
10581058
if (port) {
10591059
url.port = port;
10601060
}
1061-
url.pathname = '/' + path;
1061+
1062+
// "./" is needed to force URL() to interpret the path-variable as
1063+
// a path and not as an URL. This is relevant if for example path
1064+
// starts with more than one "/", in which case it would be
1065+
// interpreted as a host name instead.
1066+
url = new URL("./" + path, url);
10621067
} else {
10631068
// Current (May 2024) browsers support relative WebSocket
10641069
// URLs natively, but we need to support older browsers for

0 commit comments

Comments
 (0)