feat: pass cors options

This commit is contained in:
karishmas6
2024-09-25 17:01:55 +05:30
parent 9bb1d715b5
commit ec2b5d1174

View File

@@ -15,7 +15,10 @@ import { Server } from "socket.io";
const csrfProtection = csrf({ cookie: true })
const app = express();
app.use(cors());
app.use(cors({
origin: 'http://localhost:3000',
credentials: true,
}));
app.use(express.json());
const server = http.createServer(app);