Home / Guides

How to fix CORS errors on localhost in Chrome

You're running your front end on http://localhost:3000, it calls a real API, and the console says "has been blocked by CORS policy". The proper fix is on the server, but when you just need to keep working, you can add the missing response headers in the browser.

By RJ Macarthy · 3 November 2026

Why the error happens

Browsers only let a page read a response from another origin if that response includes an Access-Control-Allow-Origin header naming your origin. Your local app at localhost:3000 is a different origin from api.example.com, and the API doesn't list it, so Chrome blocks the response.

Use this for development only. It changes what your browser accepts. It doesn't fix CORS for your users. For production, configure the server.

Fix it with ProperHeader

Changing response headers is a Pro feature.

  1. Click the ProperHeader icon, then Full editor.
  2. Under Quick start, click Fix CORS for localhost. It adds four response headers:
    Access-Control-Allow-Origin: http://localhost:3000
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Headers: Content-Type, Authorization
    Access-Control-Allow-Methods: GET, POST, PUT, PATCH, DELETE, OPTIONS
  3. Change http://localhost:3000 to your dev server's exact origin (scheme, host and port).
  4. Under Filters → Only on URLs matching, add the API, for example https://api.example.com/*, so you're not changing every site.
  5. Allow ProperHeader on the API's site when it asks, then reload your app.

Common gotchas

Other ways to fix it

Questions

Is it safe to fix CORS with a browser extension?

For development, yes, as long as the rule is limited to the API you're working on. It only affects your own browser. Never rely on it for production.

Why doesn't Access-Control-Allow-Origin: * work?

Browsers reject the wildcard when a request includes credentials such as cookies. Set the header to your exact origin, for example http://localhost:3000, and add Access-Control-Allow-Credentials: true.

Does ProperHeader's free plan fix CORS?

No. CORS is fixed with response headers, which are part of Pro ($3/month or $36 once). Request headers are free.