|
|
|
|
|
by mbrubeck
6025 days ago
|
|
The spec allows the server complete discretion to accept or reject cross-origin requests. Only the origin in the request (sent by the client) is defined in terms of the originating web page; it's left entirely up to the server to decide whether or not to allow requests from any given origin. The spec talks about the server being "willing" to respond to requests from different origins, and explicitly mentions that it may support multiple origins ("This is why the server has to send these strings: to confirm which origins and URLs the server is willing to service"). This is basically the same as the Cross-Origin Resource Sharing spec, another W3C spec supported by some current browsers: http://www.w3.org/TR/access-control/ > "The first three lines in each case are hard-coded" (referring to the origin) No, the three hard-coded lines of each handshake part come before the origin headers: GET /demo HTTP/1.1
Upgrade: WebSocket
Connection: Upgrade
[...]
HTTP/1.1 101 Web Socket Protocol Handshake
Upgrade: WebSocket
Connection: Upgrade
[...]
|
|
from a guess at the fact they specifically say they use the existing same origin policy, they cant, but the confusion is cleared up with a simple test, I will check tomorrow