Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Tanney-102
Copy link
Contributor

resolve #1439

Previously, the code attempted to remove the trailing slash from urlObj.pathname by setting it to an empty string and then appending "/rtc". However, since URL objects always return "/" for an empty path when a host is present, the existing approach never truly removed the slash. This PR updates the logic to explicitly check if the pathname ends with a slash. If it does, we simply append "rtc". Otherwise, we append "/rtc". This ensures the final path is correctly formed without relying on the pathname being set to an empty string.

References

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2025

🦋 Changeset detected

Latest commit: 8f922d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2025

CLA assistant check
All committers have signed the CLA.

@lukasIO
Copy link
Contributor

lukasIO commented Mar 21, 2025

thanks for catching this!

@lukasIO lukasIO merged commit fff333c into livekit:main Mar 21, 2025
3 checks passed
@github-actions github-actions bot mentioned this pull request Mar 21, 2025
svajunas-budrys pushed a commit to svajunas-budrys/client-sdk-js that referenced this pull request Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connection failure issue when the WebSocket URL for the LiveKit server has no path.

3 participants