Cloudfront CDN의 CORS 문제를 어떻게 해결합니까?

Cloudfront CDN의 CORS 문제를 어떻게 해결합니까?

저는 WordPress 웹사이트를 운영하고 있으며 최근 CloudFront를 사용하여 CDN을 구성했습니다.

대부분의 기능은 제대로 작동하지만 Github에서 로드하는 JS 파일에 CORS 문제가 발생합니다.

이 문제를 해결하기 위해 여러 가지 방법을 시도했지만 여전히 다음 오류가 발생합니다.

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).

이것이 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)

누군가 이 문제를 해결하는 방법에 대해 조언해 주실 수 있나요?

관련 정보