Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
fix: socket
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodiaslobo committed Feb 6, 2024
1 parent fd39f90 commit ccbdbea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pages/api/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ function handleError(e: any) {

const ioHandler = async (req, res) => {
if (!res.socket.server.io) {
const io = new Server(res.socket.server);
const io = new Server(res.socket.server, {
cors: {
origin: "*",
},
addTrailingSlash: false
});

io.on("connection", (socket) => {
Object.keys(fetchers).forEach((key) => {
Expand Down

0 comments on commit ccbdbea

Please sign in to comment.