Fix nginx proxy port (3001), add nginx.conf to Dockerfile, add /ws proxy, fix WebSocketProvider for production URLs

This commit is contained in:
Agent Zero
2026-06-28 02:35:08 +02:00
parent 05ccebad8d
commit 65c1f10499
3 changed files with 17 additions and 2 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ export class WebSocketProvider {
provider: WebsocketProvider;
constructor(doc: Y.Doc, projectId: string, jwtToken: string) {
const url = `ws://localhost:3001/project:${projectId}`;
const proto = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const url = `${proto}//${window.location.host}/ws/collab`;
this.provider = new WebsocketProvider(url, `project:${projectId}`, doc, {
params: { token: jwtToken }
});