Skip to content

Commit 755fa7c

Browse files
committed
1 parent 1c15cef commit 755fa7c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/app/src/entry.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ const getCurrentUrl = () => {
104104
: location.origin,
105105
)
106106
url.pathname = import.meta.env.VITE_OPENCODE_SERVER_BASE_URL ?? ""
107-
return url.href
107+
// Stripping the trailing slash since some consumer code is sensitive to it.
108+
// For example, ~18 tests (e.g. e2e/regression/legacy-new-session.spec.ts) fail on "http://127.0.0.1:4096/", but succeed on "http://127.0.0.1:4096".
109+
return url.href.replace(/\/$/, "")
108110
}
109111

110112
const getDefaultUrl = () => {

0 commit comments

Comments
 (0)