Skip to the content.

Proxy it or fix CORS?

Every frontend team hits this in week one and half of them ship the workaround.

Your browser blocks a request to api.example.com with a CORS error. Where is the fix?

A dev-server proxy forwarding /api to api.example.com makes the error disappear. What just happened?

Your app sends a JSON body with an Authorization header. The browser makes an OPTIONS request first. Why?

You want cookies sent to the API on a different origin. What is required?