1. S3 버킷 - 권한 - CORS(Cross-origin 리소스 공유) - 편집

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT",
            "POST",
            "DELETE"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [
            "ETag",
            "Content-Length",
            "Content-Range",
            "Accept-Ranges"
        ],
        "MaxAgeSeconds": 3000
    }
]

 

 

2. CloudFront - 정책 - 응답 헤더 - 응답 헤더 정책 생성

Access-Control-Expose-Headers 에 아래와 같이 custom 값을 추가

 

3. 생성한 응답 정책을 연결

 

4. CloudFront 배포 -> 완료 이후 확인

mp4 비디오도 정상 로드 확인

+ Recent posts