Allow all origins for WebSocket requests
This commit is contained in:
parent
8b048dbef9
commit
619ba22bca
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.4.2.RELEASE</version>
|
||||
<version>1.5.1.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.charego</groupId>
|
||||
|
@ -32,7 +32,8 @@ public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
|
||||
|
||||
@Override
|
||||
public void registerStompEndpoints(StompEndpointRegistry registry) {
|
||||
registry.addEndpoint("/stomp").withSockJS();
|
||||
// Allow all origins: for JSFiddle, lol
|
||||
registry.addEndpoint("/stomp").setAllowedOrigins("*").withSockJS();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user