3 ms·
This is because websockets were created after the same origin policy, so they have always sent the origin header that allows the server to filter connections. C
by johncolanduoni 6y ago
This is because websockets were created after the same origin policy, so they have always sent the origin header that allows the server to filter connections. CORS was only needed because the browsers were adding the same origin policy to HTTP requests that had historically never had it, so they needed some set of rules (and overrides for them) that didn’t break existing websites.