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

Getting below error when calling Service/API:

Access to fetch at '/execution-sync-engine/vflowExe/get/getConfiguration' from origin 'https://dapagents.yesbank.in' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

7 Likes

access-control-allow-origin header is a Cross-Origin Resource Sharing (CORS) header.

This error occurs when a script on your website/web app attempts to make a request to a resource that is not configured to accept requests coming from code that does not come from the same domain, thus violating the Same-Origin policy.

There Are Two Approaches to Getting It Right.

  1. Use a reverse proxy
  2. Add support for handling the OPTIONS method in the resource’s code.
6 Likes

@naveen.gupta, you can use the below-listed command. That is an alternate for disabling the CORS error.
google-chrome --disable-web-security --user-data-dir=“temp”

8 Likes