Skip to content

Commit

Permalink
trying to get stomp to work cross domain
Browse files Browse the repository at this point in the history
  • Loading branch information
dogeared committed Jun 20, 2023
1 parent a186a9d commit 20b9942
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {

@Value("#{ @environment['stomp.allowed_domains']}")
private String[] stompAllowedDomains;
// @Value("#{ @environment['stomp.allowed_domains']}")
// private String[] stompAllowedDomains;

@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
Expand All @@ -23,7 +23,8 @@ public void configureMessageBroker(MessageBrokerRegistry config) {
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/ws")
.setAllowedOrigins(stompAllowedDomains)
// .setAllowedOrigins(stompAllowedDomains)
.setAllowedOriginPatterns("*")
.withSockJS();
}
}

0 comments on commit 20b9942

Please sign in to comment.