Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is expected if CORS object is empty while initialisation? #5273

Open
arpitkapoor97 opened this issue Jan 1, 2025 Discussed in #5272 · 0 comments
Open

What is expected if CORS object is empty while initialisation? #5273

arpitkapoor97 opened this issue Jan 1, 2025 Discussed in #5272 · 0 comments

Comments

@arpitkapoor97
Copy link

Discussed in #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant