Open grrbm opened 1 month ago
We need to be able to pass cors options to the socket.io instance:
server( { port, socket: { cors: { origin: "http://localhost:3000", methods: ["GET", "POST"], allowedHeaders: ["Content-Type"], credentials: true, }, }, }, cors, [ get("/", (ctx) => render("index.html")), socket("connect", updateCounter), socket("disconnect", updateCounter), socket("message", sendMessage), ] );
We need to be able to pass cors options to the socket.io instance: