CORS Problem (React + Microservices (Gateway) SpringBoot + Keycloak )

Hello!
I’m trying to connect my React app to my microservice. This microservice is protected by my Gateway, which is also secured with Keycloak. When I try to send a request to my microservice, I encounter CORS errors. I have configured Web Origins in my Keycloak client.

Hi there. There are a few ways to skin this cat.

One way would be to setup a proxy in your React app. Judging by your React URL, if you’re using Vite, see their server.proxy docs.