DEV Community

Discussion on: How do I resolve react cors error!

Collapse
 
jwhenry3 profile image
Justin Henry

This is fine if you are good with third parties having access to your traffic and payloads. Might want to invest in a NextJS or slim NodeJS in-house proxy to facilitate your needs. The concept is the same, just changing the domain you're hitting and do a passthrough from the server to hit the other server. Server-side REST calls are not subject to CORS. Why does this matter in the browser? Because arbitrary insecure code can run on the client, its significantly less likely (near impossible) to happen on the server.