Closed rydre closed 9 years ago
Hi rydre - ClojureScript's websockets are subject to the same cross-origin security constraints as standard websockets. If you're using Clojure as the websocket client though (Chord doesn't support this, but I think http-kit does) there's no such restrictions.
I'm afraid I'm no expert on the exact cross-origin rules - I usually use the rule of thumb that it has to be the same domain, port and protocol to be allowed through, although I believe there may be some way of setting some response headers on your original response that allows JavaScript on the page to connect to other origins.
Some useful wikipedia pages might be:
James
In Clojure, is there a way to open a websocket connection to a foreign server?
Thanks.