Skip to content

Suggest possible wrong Socket.IO URL instead of CORS error #1979

@rauchg

Description

@rauchg

A lot of people seem to be mistaking the error No 'Access-Control-Allow-Origin' header is present on the requested resource for lack of CORS support in Socket.IO.

This seems to be due to usually trying to initialize a socket to the wrong URL. The URL exists and responds, but obviously it doesn't set CORS headers. And even if it did, it wouldn't be where the socket.io server is hosted.

Maybe we could console.warn in these situations to warn the developer about a potential URL error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions