¿Cómo soluciono problemas de CORS en Cloudfront CDN?

¿Cómo soluciono problemas de CORS en Cloudfront CDN?

Administro un sitio web de WordPress y recientemente configuré una CDN usando CloudFront.

La mayoría de las funciones funcionan bien, pero tengo problemas de CORS con los archivos JS que estoy cargando desde Github.

He probado muchos métodos para resolver este problema, pero sigo apareciendo el siguiente error.

Ensure CORS response header values are valid

A cross-origin resource sharing (CORS) request was blocked because of invalid or missing response headers of the request or the associated preflight request .

To fix this issue, ensure the response to the CORS request and/or the associated preflight request are not missing headers and use valid header values.

Note that if an opaque response is sufficient, the request's mode can be set to no-cors to fetch the resource with CORS disabled; that way CORS headers are not required but the response content is inaccessible (opaque).

Esta es mi configuración en Cloudfront ->https://imgsh.net/a/5GFcr4m.jpg


Access-Control-Allow-Credentials
false
Access-Control-Allow-Headers
Access-Control-Allow-Methods
GET
HEAD
PUT
POST
PATCH
DELETE
OPTIONS
Access-Control-Allow-Origin
*
Access-Control-Expose-Headers
*
Access-Control-Max-Age (seconds)

¿Alguien puede aconsejarme sobre cómo resolver este problema?

información relacionada