From 4e634dac547a5b42f20a43e12b4938167b0c5ffe Mon Sep 17 00:00:00 2001 From: cruizba Date: Mon, 2 Feb 2026 19:58:38 +0100 Subject: [PATCH] Move LiveKit Webhook route to app level --- meet-ce/backend/src/server.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meet-ce/backend/src/server.ts b/meet-ce/backend/src/server.ts index 831807a1..a3a62f31 100644 --- a/meet-ce/backend/src/server.ts +++ b/meet-ce/backend/src/server.ts @@ -100,8 +100,6 @@ const createApp = () => { appRouter.use('/health', (_req: Request, res: Response) => res.status(200).send('OK')); - // LiveKit Webhook route - appRouter.use('/livekit/webhook', livekitWebhookRouter); // Serve OpenVidu Meet webcomponent bundle file appRouter.get('/v1/openvidu-meet.js', (_req: Request, res: Response) => res.sendFile(webcomponentBundlePath)); // Serve OpenVidu Meet index.html file for all non-API routes (with dynamic base path injection) @@ -113,6 +111,10 @@ const createApp = () => { res.status(404).json({ error: 'Path Not Found', message: 'API path not implemented' }) ); + // LiveKit Webhook route - mounted directly on app (not under base path) + // This allows webhooks to always be received at /livekit/webhook regardless of base path configuration + app.use('/livekit/webhook', livekitWebhookRouter); + // Mount all routes under the configured base path app.use(basePath, appRouter);