From 7f503c04d20c75180786e0f255b2e149d2609729 Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Fri, 15 Nov 2024 17:50:02 +0100 Subject: [PATCH] fix: socket-io cors --- src/api/routes/socket-io.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/routes/socket-io.ts b/src/api/routes/socket-io.ts index 2be3c33..9c92f51 100644 --- a/src/api/routes/socket-io.ts +++ b/src/api/routes/socket-io.ts @@ -34,6 +34,7 @@ export const SocketIORoutes: FastifyPluginAsync< > = async (fastify, _options) => { const db = fastify.db; const io = new Server(fastify.server, { + cors: { origin: '*' }, path: fastify.prefix + '/socket.io/', transports: ['websocket', 'polling'], });