CORS error (Route53 + Cloudfront CNAME + S3)

2022. 7. 29. 15:13AWS/Amazon CloudFront

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

'AWS > Amazon CloudFront' 카테고리의 다른 글

Cloudfront monitoring metric & reports  (0) 2022.11.04
cloudfront s3 redirect access denied  (0) 2022.10.20
Cloudfront supports HTTP/3  (0) 2022.08.16
Cloudfront Origin Shield  (0) 2022.07.29
SPA - Cloudfront + S3 403/404 이슈  (0) 2022.07.28