News for hackers. Stuff that matters.
Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by omgtehlion on Monday March 18, 2024 @02:46PM (#39748306)
Well, that constructor by default sends all the headers you have for your own domain and auth you are entitled to. This is how all other APIs in browsers work due to security and privacy concerns.

If you call to other domains, then this problem is no different to what we had with CORS years ago.

Re:WebSockets vs. Server-Sent-Events vs. Long-Polling vs. We... by apitman on Monday March 18, 2024 @04:42PM (#39749756)
> This is how all other APIs in browsers work due to security and privacy concerns

They're probably comparing it to the fetch and XHR APIs, which both allow custom headers.