How to solve S3 CORS file error with "Access-Control-Allow-Origin" header block

Опубликовано: 04 Сентябрь 2020
на канале: Jonathan Soma
90,513
507

Did you upload a file to S3 to power your web application or visualization, and now it just won’t work? Let’s figure out what CORS is and how it prevents you from accessing a file that seems to work normally locally and when visiting the URL manually.

AWS DOESN'T ACCEPT XML ANY MORE! You'll get the error "The CORS configuration must be written in valid JSON." The new JSON CORS policy code is located at https://gist.github.com/jsoma/5830e8b...

The old XML CORS policy code is located at https://gist.github.com/jsoma/ed9eb3d...

The error you were probably getting is: Access to fetch at 'https://xxxxxx.s3.amazonaws.com/' from origin 'http://localhost:8000' has been blocked by CORS policy: 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.

References: https://aws.amazon.com/


Смотрите видео How to solve S3 CORS file error with "Access-Control-Allow-Origin" header block онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Jonathan Soma 04 Сентябрь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 90,513 раз и оно понравилось 507 людям.