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

**URL:** <https://forum.keycloak.org/t/cors-problem-react-microservices-gateway-springboot-keycloak/24530>\
**Category:** Securing applications\
**Created:** [February 12, 2024, 11:03pm UTC](https://forum.keycloak.org/t/cors-problem-react-microservices-gateway-springboot-keycloak/24530 "2024-02-12T23:03:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mcvetic](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/mcvetic/32/9761_2.png) [@Mcvetic](https://forum.keycloak.org/u/Mcvetic)\
**Post date:** [February 12, 2024, 11:03pm UTC](https://forum.keycloak.org/t/cors-problem-react-microservices-gateway-springboot-keycloak/24530/1 "2024-02-12T23:03:10Z")

</div>

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.

 ![Screenshot 2024-02-12 200402](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/3/3d464131889a54a7dcb8e3ee81de91e43b961c66.png)

---

<div class="post-metadata">

**Author:** ![zach-betz-hln](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/zach-betz-hln/32/9389_2.png) [@zach-betz-hln](https://forum.keycloak.org/u/zach-betz-hln)\
**Post date:** [February 19, 2024, 4:35pm UTC](https://forum.keycloak.org/t/cors-problem-react-microservices-gateway-springboot-keycloak/24530/2 "2024-02-19T16:35:24Z")

</div>

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](https://vitejs.dev/config/server-options.html#server-proxy) docs.
