Skip to content

xhr-* transports do not handle cross-domain requests #12

@mscdex

Description

@mscdex

I noticed that the xhr-* transports do not support cross-domain requests, while the websocket transport does (by checking the listener's origin property).

I didn't realize what the exact problem was until I did a fair amount of digging. It looks like xhr-* transports may have to listen for the 'OPTIONS' HTTP method and respond appropriately for this to work? Apparently the 'OPTIONS' method is a "pre-flight" message that is essentially requesting to make a request to the server and a message has to be sent back for the real (GET in Socket.io's case) request to occur.

I'll try and see if I can get something going, but I wasn't sure if support for this is coming soon or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions