Reputation: 173
When I try to upload a JS file to S3, I get the upload error: OptionsRequestDenied. All the other files, including the JS ones have worked except this one.
The file makes some cross-origin requests using jQuery like this:
function corsRequest(callback){
$.get("www.example.com", function(data, status){
callback(data);
})
}
setInterval(corsRequest, 5000);
I've tried changing the CORS settings to allow all methods:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
However, OPTIONS
is not allowed and returns the error:
Found unsupported HTTP method in CORS config. Unsupported method is OPTIONS
I even created a fresh bucket and it won't upload there either.
I can't find a reference to the error in the AWS docs. Any help would be appreciated.
Upvotes: 13
Views: 8044
Reputation: 14191
I've encountered this issue a couple of times.
Basically, for me the issue was with regards to my internet connection. Our network here is very unstable so sometimes it is fast and sometimes it is very slow and the internet connection can intermittently get disconnected.
So if you encounter this and the other answers for this question did not help - you are probably encountering the same scenario as I am. The simple solution is to connect to the internet from a more reliable source or simply retry the upload if you feel confident that your connection is now stable (e.g., after resetting the router, etc).
FYI I am mostly using Chrome & Opera browsers for work when I encountered this.
Upvotes: 0
Reputation: 21
i personally have faced the same challenge and i installed a vpn on my browser and i was able to upload the files to my aws s3 buckets.
Upvotes: 0
Reputation: 1
I had the error in Edge, for a single csv out of 9 files which were from the same source, and switched to Chrome where it uploaded fine.
Upvotes: 0
Reputation: 1
I was having this issue, didn't have an ad blocker on but did have my VPN running. Turned it off and the upload worked as normal.
Upvotes: 0
Reputation: 11
In Chrome Settings under Privacy and Security, I disabled "Send a "Do Not Track" request with your browsing traffic" and it worked.
Upvotes: 0
Reputation: 2838
None of the above solutions worked for me.
I was able to upload the files successfully while on home internet. Turns out my workplace network/firewall was causing the error.
Upvotes: 0
Reputation: 14185
It's more of a workaround than solution - Safari on Mac has a problem. Chrome worked in my case.
Upvotes: 0
Reputation: 2829
It seems that allowing cookies makes it work for me in Brave.
Upvotes: 9
Reputation: 3761
Disable "Prevent cross-site tracking" in Privacy tab in safari settings
Upvotes: 3
Reputation: 191
Hey just in case anyone runs into this in Safari as well, under Privacy you need to disable "cross-site blocking" to get this to work at least as of October 29th 2018
Upvotes: 19
Reputation: 427
Turning off any tracking blocker extension like uBlock Origin fixed it for me.
Upvotes: 9