/chrome/community?hl=en
This content is likely not relevant anymore. Try searching or browse recent questions.
-
I started getting CORS errors after upgrading to v76. 1 Recommended Answer 90 Replies 747 Upvotes
1 Recommended Answer
$0 Recommended Answers
I'm developing a web app that makes web service requests via Axios to an endpoint on one of our development servers. The requests are going from my local computer to an internal URL. This had been working fine up until the start of this week. Since upgrading to v76, I started getting this error:

​Access to XMLHttpRequest at '...' from origin '...' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.

​I've confirmed that the end point has the appropriate settings for Access-Control-Allow-Origin ("*"), Access-Control-Allow-Headers ("*"), and Access-Control-Allow-Methods ("POST, GET, OPTIONS, DELETE, PUT"), and that the service I'm calling is set to return status code 200 OK. The service also works without issue when I hit it directly via the browser.

I can also confirm that a coworker who is still on v75 is not having this issue, running the same exact code. Any ideas or help would be appreciated. Thanks!
All Replies (90)
I noticed when switching to incognito, it works but otherwise I'm getting similar issue as above.
marked this as an answer
Yes, getting CORS error in all external script.
in incognito it works fine
marked this as an answer
I notice that the preflight OPTIONS HTTP request is not being sent on Chrome 76, whereas it was on Chrome 75 as well as Firefox.
marked this as an answer
I'm experiencing the very same problem
marked this as an answer
Hi Folks,

To disable the CORS in latest Chrome, you have to start a separate Chrome browser (if you are a developer and testing/developing site locally).

Use following command to do this
===========================================

(A) - Windows - Open command prompt or run box and enter "start chrome --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp"

(B) - Linux - Command "google-chrome --disable-web-security"

(C) - MacOS - Terminal "open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security"


Additional Info (Web Auth)
=============================================
If your endpoint is protected by 'Web Auth' the you have to send the Header 
xhr.setRequestHeader("Authorization", "Basic " + credentials);
.. where credentials are "let credentials = btoa(username + ":" + password);"


Cheers!
Neeraj Singh
marked this as an answer
This question is locked and replying has been disabled.
Discard post? You will lose what you have written so far.
Write a reply
10 characters required
Failed to attach file, click here to try again.
Discard post?
You will lose what you have written so far.
Personal information found

We found the following personal information in your message:

This information will be visible to anyone who visits or subscribes to notifications for this post. Are you sure you want to continue?

A problem occurred. Please try again.
Create Reply
Edit Reply
Delete post?
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Report abuse
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
Report post
What type of post are you reporting?
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.

Go to the Legal Help page to request content changes for legal reasons.

Reported post for abuse
Unable to send report.
This reply is no longer available.
/chrome/threads
//accounts.google.com/ServiceLogin
You'll receive email notifications for new posts at
Unable to delete question.
Unable to update vote.
Unable to update subscription.
You have been unsubscribed
Deleted
Unable to delete reply.
Removed from Answers
Marked as Recommended Answer
Removed recommendation
Undo
Unable to update reply.
Unable to update vote.
Thank you. Your response was recorded.
Unable to undo vote.
Thank you. This reply will now display in the answers section.
Link copied
Locked
Unlocked
Unable to lock
Unable to unlock
Pinned
Unpinned
Unable to pin
Unable to unpin
Marked
Unmarked
Unable to mark
Reported as off topic
/chrome/profile/0?hl=en