{"action":"created","issue":{"url":"https://api.github.com/repos/rstoyanchev/spring-websocket-portfolio/issues/39","labels_url":"https://api.github.com/repos/rstoyanchev/spring-websocket-portfolio/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/rstoyanchev/spring-websocket-portfolio/issues/39/comments","events_url":"https://api.github.com/repos/rstoyanchev/spring-websocket-portfolio/issues/39/events","html_url":"https://github.com/rstoyanchev/spring-websocket-portfolio/issues/39","id":34436865,"number":39,"title":"stomp proxy","user":{"login":"alleywind","id":974212,"avatar_url":"https://avatars.githubusercontent.com/u/974212?v=3","gravatar_id":"","url":"https://api.github.com/users/alleywind","html_url":"https://github.com/alleywind","followers_url":"https://api.github.com/users/alleywind/followers","following_url":"https://api.github.com/users/alleywind/following{/other_user}","gists_url":"https://api.github.com/users/alleywind/gists{/gist_id}","starred_url":"https://api.github.com/users/alleywind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alleywind/subscriptions","organizations_url":"https://api.github.com/users/alleywind/orgs","repos_url":"https://api.github.com/users/alleywind/repos","events_url":"https://api.github.com/users/alleywind/events{/privacy}","received_events_url":"https://api.github.com/users/alleywind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-05-28T05:35:52Z","updated_at":"2015-04-29T13:37:00Z","closed_at":null,"body":"Is there any application like httpd or nginx which could proxy stomp protocol？"},"comment":{"url":"https://api.github.com/repos/rstoyanchev/spring-websocket-portfolio/issues/comments/97428477","html_url":"https://github.com/rstoyanchev/spring-websocket-portfolio/issues/39#issuecomment-97428477","issue_url":"https://api.github.com/repos/rstoyanchev/spring-websocket-portfolio/issues/39","id":97428477,"user":{"login":"idelpivnitskiy","id":3968288,"avatar_url":"https://avatars.githubusercontent.com/u/3968288?v=3","gravatar_id":"","url":"https://api.github.com/users/idelpivnitskiy","html_url":"https://github.com/idelpivnitskiy","followers_url":"https://api.github.com/users/idelpivnitskiy/followers","following_url":"https://api.github.com/users/idelpivnitskiy/following{/other_user}","gists_url":"https://api.github.com/users/idelpivnitskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/idelpivnitskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idelpivnitskiy/subscriptions","organizations_url":"https://api.github.com/users/idelpivnitskiy/orgs","repos_url":"https://api.github.com/users/idelpivnitskiy/repos","events_url":"https://api.github.com/users/idelpivnitskiy/events{/privacy}","received_events_url":"https://api.github.com/users/idelpivnitskiy/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T13:37:00Z","updated_at":"2015-04-29T13:37:00Z","body":"I used nginx configuration which is presented above, but it didn't work for me in Google Chrome and worked in Firefox only through xhr (for websocket it returned 403). To solve this issue I've added `setAllowedOrigins(\"http://mydomain\")` to my registered endpoint:\r\n```java\r\npublic class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {\r\n\r\n    @Override\r\n    public void registerStompEndpoints(StompEndpointRegistry registry) {\r\n        registry.addEndpoint(\"/portfolio\").setAllowedOrigins(\"http://mydomain\").withSockJS();\r\n    }\r\n    ...\r\n}\r\n```\r\nSee https://github.com/rstoyanchev/spring-websocket-portfolio/blob/5c898599d7fe75d2d852ac5accd2721640803726/src/main/java/org/springframework/samples/portfolio/config/WebSocketConfig.java#L36-L39\r\nHope, this will help to somebody :)"}}