spring-guides / gs-messaging-stomp-websocket

Using WebSocket to build an interactive web application :: Learn how to the send and receive messages between a browser and the server over a WebSocket

Home Page:http://spring.io/guides/gs/messaging-stomp-websocket/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CROS origin issue

nanosiddik opened this issue · comments

Websocket with stomp sock js accessing through spring cloud gateway . two rest API service and websocket ,so total three is routed through gateway. rest API working fine but websocket showing below error. Also I have implemented cross filters for cross origin .
Access to XMLHttpRequest at 'http://localhost:8085/websocket/live-mine/info?t=1593887703692' from origin 'http://localhost:8080' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values 'http://localhost:8080, http://localhost:8080', but only one is allowed.

Every service deploy different machine in cloud

I think this is a question about Spring Cloud Gateway? Doesn't seem to be directly relevant to this guide anyway. Perhaps you could try Stack Overflow if you need general help with something other than this guide?