socket.io
socket.io copied to clipboard
What is expected if CORS object is empty while initialisation?
Discussed in https://github.com/socketio/socket.io/discussions/5272
Originally posted by arpitkapoor97 January 1, 2025 Consider below scenarios, when I am trying to connect a client from a different PORT/URL.
` const app = express(); const server = createServer(app);
const io = new Server(server); // This gives CORS error const io = new Server(server, {}); // This also gives CORS error
const io = new Server(server, { cors: {} });`
// This gives no CORS error. WHY?
PS: I am experimenting this on code spaces so it might behave differently.