close

[Fixed] Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource

Today We are Going To Solve Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resourcein Javascript. Here we will Discuss All Possible Solutions and How this error Occurs So let’s get started with this Article.

How to Fix Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource Error?

  1. How to Fix Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource Error?

    To Fix Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource Error just For window. To solve this error in window just follow this steps: First of all open the start menu and open “run”. And then run the following command: chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security
    This will help you to solve your error.

  2. Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource

    To Fix Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource Error just For mac. If uou are using mac thgen first of all go to the terminal and run the following command: open /Applications/Google\ Chrome.app --args --user-data-dir="/var/tmp/Chrome dev session" --disable-web-security You can use this to solve your error.

Solution 1 : For window

To solve this error in window just follow this steps:

First of all open the start menu and open “run”. And then run the following command:

chrome.exe --user-data-dir="C://Chrome dev session" --disable-web-security

This will help you to solve your error.

Solution 2 : For mac

If uou are using mac thgen first of all go to the terminal and run the following command:

open /Applications/Google\ Chrome.app --args --user-data-dir="/var/tmp/Chrome dev session" --disable-web-security

You can use this to solve your error.

Conclusion

So these were all possible solutions to this error. I hope your error has been solved by this article. In the comments, tell us which solution worked? If you liked our article, please share it on your social media and comment on your suggestions. Thank you.

Also Read This Solutions

Leave a Comment