CORS error : No 'Access-Control-Allow-Origin' header is present on the requested resource

  1. getting this error for post, put, patch requests.


    Screenshot 2025-09-10 at 6.11.23 PM

  2. Why CORS policy is not checking for get request?

  3. Need more details about Preflight Continue toggle button.

2 Likes

Hello @JeevanKumar ,
it’s happening because of CORS . By default, browsers block requests to APIs that don’t allow your app’s domain.

For learning and testing, you can install a CORS extension in your browser. The extension adds a header called Access-Control-Allow-Origin which tells the browser to allow the request. That’s why the extension is needed — otherwise, the browser will block it.

1 Like

Hey @JeevanKumar,

There are properties available in CORS npm module. If you are facing issue with CORS origin I recommend you to toggle on the credential and add another string in the origin properties.

Coming to preflight, preflight request is some verification request send to server before the actual request by the browser. This validation is enabled if you turn on credential toggle if I’m not wrong. The preflight request will contains some options which will be validated against your configuration and the request will be ended in the middleware itself, meaning it wont be passed to next node. If you turn on preflight continue toggle, it will be passed onto next node. Can be used for further validation if required.

Thanks.

2 Likes