When websocket connected to server via domen, Web socket status finished, if connected via ip addres it works

Viewed 32

Spring boot application and used Spring web socket with Stomp. Is there anyone who faced to this problem?

My socket config:

@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {


    @Override
    public void configureMessageBroker(MessageBrokerRegistry config) {
        config.enableSimpleBroker("/topic");
        config.setApplicationDestinationPrefixes("/app");
    }

    @Override
    public void registerStompEndpoints(StompEndpointRegistry registry) {
        registry.addEndpoint("/websocket").setAllowedOriginPatterns("*").withSockJS();
    }
}

And connected with ip address: it connected successfully

and if I try with domen: not ok

0 Answers
Related