Skip to content
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

Fixed Event Source to include the with credentials options #299

Closed
wants to merge 1 commit into from

Conversation

cloudmark
Copy link

The cookies were not being sent to the client because of this missing option

@brycekahle
Copy link
Contributor

@cloudmark
Copy link
Author

I see what you mean. Can't this be avoided though if the X-Frame Option header is set from the server - X-Frame-Options SAMEORIGIN;?

@brycekahle
Copy link
Contributor

That would assume the sockjs origin is the same as the serving page, which is not always the case. That header is also not supported by all of the browser versions this library targets.

@cloudmark
Copy link
Author

Isn't support limited though for ALLOW-FROM support. SAMEORIGIN is supported by all modern browsers. I think it is quite common for the iframe to be included from the same origin. Would you oppose to such an option being exposed on the sockjs client or a tranport which enables this.

@brycekahle
Copy link
Contributor

I disagree about them often being the same origin. A common setup has the real-time infrastructure separate from the website. The browsers this library supports extends way beyond "modern" as well.

X-Frame-Options would only be safe if you limited which browsers were able to connect. This means user-agent sniffing, which is not ideal.

@cloudmark
Copy link
Author

I think it be fair to say that the eventsource withCredentials flag is dependent on the reactive server setup. Can't this flag be exposed so that FE developers can override the default (sane) behaviour in a scenario in which the reactive server setup is known (with the iframe xframe-options setup).

Which browsers do not support the X-Frame-Options: SAME ORIGIN? I'm curious.

Feel free to close this issue if you feel that this proposal is not inline with the projects vision.

@brycekahle
Copy link
Contributor

IE <8, Opera < 10.5, Safari < 4

@brycekahle brycekahle closed this Apr 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants