-
Notifications
You must be signed in to change notification settings - Fork 96
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 #35
Comments
It seems you are missing the const { createServer } = require("http");
const { Server } = require("socket.io");
const { instrument } = require("@socket.io/admin-ui");
const httpServer = createServer();
const io = new Server(httpServer, {
cors: {
origin: ["https://admin.socket.io"],
credentials: true
}
});
instrument(io, {
auth: false
});
httpServer.listen(3000); Reference: https://socket.io/docs/v4/admin-ui/#server-side Could you please check? |
My mistake. The line "credentials: true" is not there, but I wrote it already. |
@GeonwooDev have you eventually found a solution? |
|
any updates on this? |
@MehdiMamas unfortunatly I am not able to reproduce the issue. From my understanding there are two possible explanations:
Could you please share what gets printed to the console? |
did you find the answer |
Getting error as well. |
I have added a few examples in the documentation about the Does that help? |
same issue here. |
I have also tried everything in this thread, to no avail. |
Same issue |
I want to connect client web page for socketIO and admin-ui to socketIO server.
But the error appears.
When I use this code below, the client web disconnects with cors error.
Of course, I did like this, and "xhr poll error" happens on admin-ui.
does admin-ui supports only local environment?
The text was updated successfully, but these errors were encountered: