- 최신
- 최다 투표
- 가장 많은 댓글
It seems like the OPTIONS request is being blocked either due to incorrect CORS configuration or WAF rules blocking the request. A few things to check:
Verify that the CORS configuration on the S3 bucket allows the Origin, Access-Control-Request-Method and Access-Control-Request-Headers that are being sent in the OPTIONS request.
Check if a WAF web ACL is associated with the CloudFront distribution and blocking the OPTIONS request. The WAF rules need to allow OPTIONS requests to pass through.
Make sure the CloudFront distribution behavior allows OPTIONS method.
Try simplifying the CORS configuration on S3 to just allow all origins, methods and headers as a test:
[
{
"AllowedHeaders": ["*"],
"AllowedMethods": ["GET","PUT","POST","DELETE","HEAD","OPTIONS"],
"AllowedOrigins": ["*"],
"ExposeHeaders": []
}
]
Check CloudFront and S3 access logs to see exactly what requests are reaching the origin and getting blocked.
관련 콘텐츠
- AWS 공식업데이트됨 2년 전
- AWS 공식업데이트됨 일 년 전
- AWS 공식업데이트됨 2년 전
I was assuming that cloudfront itself handled the CORS requests, and no setup from S3 side was needed. I solved de problem after configure CORS on S3.