Access to fetch at 'https://www.googleapis.com/calendar/v3/primary/events' from origin 'https://s3.amazonaws.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I am trying to add an event onto my google calendar through the calendar API. I'm currently trying to run my code through my S3 bucket. I've tried adding an origin URI such as https://s3.amazonaws.com
. Of course I've looked at other posts but have found no solution that would help with my problem.
I made a COR configuration within my bucket:
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"https://s3.amazonaws.com"
],
"ExposeHeaders": [
"x-amz-server-side-encryption",
"x-amz-request-id",
"x-amz-id-2"
],
"MaxAgeSeconds": 3000
}
]
Even after doing that, the error persists. If anyone has any insight on this, it would be much appreciated. Thank you.
edit: I am no longer using http://localhost:8000