spring-cloud-gateway-sample icon indicating copy to clipboard operation
spring-cloud-gateway-sample copied to clipboard

Cross origin issue

Open nanosiddik opened this issue 5 years ago • 1 comments

I am getting the this error "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." actually i have deployed first service and eureka in one AWS machine and second ,notification deployed in another AWS machine and gateway is running in local and i am accessing from another web application in local. I have created a cross filter class . for rest api its working fine but for websocket its not working i am getting the mentioned error . I have been trying for the last two week . till now not solved .Please help me .

nanosiddik avatar Jul 04 '20 21:07 nanosiddik

First service, second service,notification service (websocket stomp with sock js) ,spring cloud gateway,web for accessing . every service deploy different machine in cloud aws

nanosiddik avatar Jul 04 '20 21:07 nanosiddik