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

CORS error #2

Open
samuelkannuberg opened this issue Apr 6, 2021 · 3 comments
Open

CORS error #2

samuelkannuberg opened this issue Apr 6, 2021 · 3 comments

Comments

@samuelkannuberg
Copy link

I get a CORS error in the inspect console and I don't know how to fix it...

Can somebody help?

@sahilrajput03
Copy link

I am trying to solve this issue as well.., will send you the code when it works for me,,
and do tell if you managed to sovle it?

@sahilrajput03
Copy link

@samuelkannuberg , using below code works well:

const io = require('socket.io')(3000, {
	cors: {
		origin: true, // true means to use any frontend.
	},
})

@cergina
Copy link

cergina commented Sep 20, 2021

thanks for a solution!

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

3 participants