CORS issue on/in nodejs and react application via cloudflare tunnel
Hi,
So the scenario is as follows:
and frontend api baseurl is:
I am kind of stuck here as I am a little new to CORS and related stuff, if anyone can help would be appreciated.
So the scenario is as follows:
- Have my frontend and backend both under a single
along with a cloudflare tunneldocker-compose.yml - The tunnel has then two public hostnames (CNAMEs) mapped to
frontend.example.com->frontend service name:portandbackend.example.com->backend service name:port - These two are working fine individually when I tested locally and after serving via cloudflare tunnel
- For the sake of simplicity and testing I enabled "cloudflare access" and CORS settings are (refer screenshot 1)
- Then whenever I'm trying to send a request from frontend to the backend, I'm getting the cloudflare access screen for response (refer screenshot 2)
- So again for the sake of simplicity I removed my
backend.example.comfrom the cloudflare access and then all of a sudden I'm am completely getting CORS error
and frontend api baseurl is:
I am kind of stuck here as I am a little new to CORS and related stuff, if anyone can help would be appreciated.











