Blocked by CORS policy - accessing S3 bill from Django app

I am having a problem with my application accessing font files in my S3 bucket.

Here is my CORS policy in the S3 bucket:

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
    <ExposeHeader>ETag</ExposeHeader>
  </CORSRule>
</CORSConfiguration>

      

But in the console when accessing my website, I get this:

blocked by CORS policy: no "Access-Control-Allow-Origin" header present in the requested resource

+3


source to share





All Articles