Skip to content

Scalability and Content Security Policies inside Discord Activities (Discord Embedded SDK) #707

Open
@endel

Description

@endel

Context & Description

When scaling the number of processes by setting the publicAddress config in the server, the client will not be able to connect to the server from within the sandboxed Discord Activity due to CSP:

image

This problem occurs because the Colyseus SDK will use the publicAddress configured in the server to establish the WebSocket connection, whereas the Discord Activities require every request to go through their sandboxed relative URLs where URL Mappings can be set for external services.

Proposed API

The client-side SDK should be able to customize the endpoint URL before trying to establish the connection. We could expose an API that is capable of customizing the output of buildEndpoint()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions