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.