Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/collab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10406,6 +10406,12 @@ export async function startCollabRuntimeEmbedded(mainHttpPort: number): Promise<
},
} as unknown);

// Signal embedded mode so resolveRequestScopedCollabWsBase keeps the
// main HTTP port instead of adding +1 for a standalone collab port.
if (!process.env.COLLAB_EMBEDDED_WS) {
process.env.COLLAB_EMBEDDED_WS = '1';
}

runtime = {
enabled: true,
wsUrlBase: wsUrlBase.replace(/\/+$/, ''),
Expand Down
1 change: 1 addition & 0 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ async function main(): Promise<void> {

app.use(express.json({ limit: '10mb' }));
app.use(express.static(path.join(__dirname, '..', 'public')));
app.use(express.static(path.join(__dirname, '..', 'dist')));

app.use((req, res, next) => {
const originHeader = req.header('origin');
Expand Down