Skip to content

There should be an option for EventSource withCredentials (keyword CORS) #9

Description

@Revisor

Hi, thanks for the great module and the accompanying JS library.

Right now it is not possible to initiate an EventSource connection with the withCredentials: true parameter.

The line 673 looks like this

this.listener = new EventSource(url);

Since the CORS intent must be indicated in the constructor and not later, it must be solved on this line.

this.listener = new EventSource(url, { withCredentials: true });

Users would probably want to have a choice, so maybe pass it through the opt array?

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions