AWS/Amazon CloudFront

CORS error (Route53 + Cloudfront CNAME + S3)

워니주니구니 2022. 7. 29. 15:13
728x90
SMALL

- 개요

CORS error는 사소하면서도 해결이 깔끔하게 안되는 문제중 하나이다.

 

 

- S3 Cors 설정

>> Permission 최하단
>> CORS
>> AllowedOrigins

 

 

- 예제

"AllowedOrigins": [
            "*"
        ],

 

 

- Cloudfront Cors 설정

Distributions
>> Behavior
>> Response headers policy
>> CORS-With-Preflight

Cloudfront Invalidations

 

 

- 비고

수 분 기다리면 완료.

 

 

- 참고

https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html https://docs.aws.amazon.com/ko_kr/AmazonCloudFront/latest/DeveloperGuide/using-managed-response-headers-policies.html

 

728x90
LIST