Author : Esotopo21

I’m trying to build a chat application. When hosting on a VPS i’m having this error message from browser Access to XMLHttpRequest at ‘http://localhost:8080/samplews/info?t=1603709911491’ from origin ‘http://my-server-ip:8081’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. This is my WebSocketConfiguration class @Configuration @EnableWebSocketMessageBroker public class WebSocketConfiguration extends AbstractWebSocketMessageBrokerConfigurer { ..

Read more