Skip to content

CSP blocks connections to LiveKit regional endpoints #36

Description

@Patriciaath999

sation-xxx.livekit.cloudto a regional endpoint such as:conversation-xxx.otokyo1b.production.livekit.cloud`
However, the generated Content Security Policy only allows the original hostname. The browser therefore blocks
the regional endpoint.

Steps to reproduce

  1. Configure CodeTrial to use a LiveKit Cloud project. 2. Run the server with make serve. 3. Open
    http://localhost:3000. 4. Start an interview. 5. Check the browser console.

Actual result

The browser reports: Refused to connect because it violates the document's Content Security Policy. The
LiveKit client then fails to establish the signal connection.

Expected result

The browser should allow LiveKit regional endpoints and successfully establish the signaling connection.

Investigation

Allowing HTTPS and WSS connections to *.livekit.cloud in connect-src removes the CSP error. After this
change, I encountered HTTP 429 responses from LiveKit. That appears to be a separate service-side or
account-related issue and is not caused by audio playback.

Environment

  • Windows with WSL - Browser opened at http://localhost:3000 - CodeTrial built and served from WSL
  • LiveKit Cloud

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions