-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Multiple origins in options #130
Comments
What was the verdict on this? |
I've had the same problem. There is nothing about that in docs but it's already available in socket.io. Those :* are important. Without it, it will not work. |
The :* is for specifying ports and yes it won't work without it. |
@Gut6 FYI, your sample code cause security issues.
will be processed at here Line 87 in e0b2cb0
so You must use array instead of string, like this: |
This won't work in the latest version of You can now pass the array of allowed origins in the io server config like this:
|
real good help for me even a year later, thanks! |
yeppp... the same. many thanks! |
This is my code, and wont work on live or dev server
|
@taffil this should be: const io = require("socket.io")(http, {
cors: {
origin: [
"https://www.domain.com",
"https://www.dev-domain.com",
],
methods: ["GET", "POST"],
},
}); The extra ̀ |
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2. - [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases) - [Commits](SamVerschueren/decode-uri-component@v0.2.0...v0.2.2) --- updated-dependencies: - dependency-name: decode-uri-component dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hi,
Could multiple origins be supported in a later version of Socket.IO-node so we may specify either an array of origins or a comma separated list of origins?
Thanks.
The text was updated successfully, but these errors were encountered: