DevOps Others

Hot Fix for CORS issue

Cross-Origin Resource Sharing (CORS) is a standard that allows a server to relax the same-origin policy. This is used to explicitly allow some cross-origin requests while rejecting others.For example, if a site offers an embeddable service, it may be necessary to relax certain restrictions. Setting up such a CORS configuration isn’t necessarily easy and may present some challenges. In these pages, we’ll look into some common CORS error messages and how to resolve them.

When we didn’t setup the CORS configuration on the backend side, we can use the following solution to fix the hot issues.

Step 1: Close the all google chrome browsers
Step 2: Open terminal and run the following code
`open -a Google\ Chrome –args –disable-web-security –user-data-dir`

Once you reopen the chrome browser this way, you will not see any CORS issue anymore. But this is not a secure way, so use at your own risk.

Resources:

  1. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
  2. https://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *