{"action":"opened","issue":{"url":"https://api.github.com/repos/spring-guides/tut-react-and-spring-data-rest/issues/16","repository_url":"https://api.github.com/repos/spring-guides/tut-react-and-spring-data-rest","labels_url":"https://api.github.com/repos/spring-guides/tut-react-and-spring-data-rest/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/spring-guides/tut-react-and-spring-data-rest/issues/16/comments","events_url":"https://api.github.com/repos/spring-guides/tut-react-and-spring-data-rest/issues/16/events","html_url":"https://github.com/spring-guides/tut-react-and-spring-data-rest/issues/16","id":137860400,"number":16,"title":"Enable CORS at AbstractWebSocketMessageBrokerConfigurer","user":{"login":"tur-ing","id":15199933,"avatar_url":"https://avatars.githubusercontent.com/u/15199933?v=3","gravatar_id":"","url":"https://api.github.com/users/tur-ing","html_url":"https://github.com/tur-ing","followers_url":"https://api.github.com/users/tur-ing/followers","following_url":"https://api.github.com/users/tur-ing/following{/other_user}","gists_url":"https://api.github.com/users/tur-ing/gists{/gist_id}","starred_url":"https://api.github.com/users/tur-ing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tur-ing/subscriptions","organizations_url":"https://api.github.com/users/tur-ing/orgs","repos_url":"https://api.github.com/users/tur-ing/repos","events_url":"https://api.github.com/users/tur-ing/events{/privacy}","received_events_url":"https://api.github.com/users/tur-ing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-02T12:21:53Z","updated_at":"2016-03-02T12:21:53Z","closed_at":null,"body":"I want to access the WebSocket from another host. I tried to set the `.setAllowedOrigins(\"*\")` like this, which does not work:\r\n```\r\n\r\n@Component\r\n@EnableWebSocketMessageBroker\r\npublic class WebSocketConfiguration extends AbstractWebSocketMessageBrokerConfigurer {\r\n\r\n\tpublic static final String MESSAGE_PREFIX = \"/topic\";\r\n\r\n\t@Override\r\n\tpublic void registerStompEndpoints(StompEndpointRegistry registry) {\r\n\t\tregistry.addEndpoint(\"/employees\").setAllowedOrigins(\"*\").withSockJS();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic void configureMessageBroker(MessageBrokerRegistry registry) {\r\n\t\tregistry.enableSimpleBroker(MESSAGE_PREFIX);\r\n\t\tregistry.setApplicationDestinationPrefixes(\"/app\");\r\n\t}\r\n\t\r\n}\r\n```"}}