From origin 'https://....com' has been blocked by CORS policy: No 'Access

Hello guys!

Im having this issue “has been blocked by CORS policy: No 'Access”, that is happening just to request fonts (woff2) from R2 bucket.

I setted my CORS policy like this:

[
  {
    "AllowedOrigins": [
      "https://tld.com",
      "https://www.tld.com"
    ],
    "AllowedMethods": [
      "GET",
      "PUT",
      "POST"
    ],
    "AllowedHeaders": [
      "Access-Control-Allow-Origin : Content-Type"
    ],
    "MaxAgeSeconds": 1800
  }
]

Any idea how to fix this?

Thank you

Instead of:

"AllowedHeaders": [
      "Access-Control-Allow-Origin : Content-Type"
],

use:

"AllowedHeaders": [
      "Access-Control-Allow-Origin",
      "Content-Type"
]