I encountered a CORS error when trying to load a script <script src="https://d**.cloudfront.../chunk-... /> (the host is another domain), as indicated in the network tab:
The scripts are hosted on AWS S3 and delivered through CloudFront. Despite configuring the CORS policy in CloudFront, the error persists.
Additionally, I executed curl -I and received the following response:
HTTP/2 200
content-type: application/javascript
content-length: 121954
date: Tue, 12 Dec 2023 06:47:12 GMT
last-modified: Mon, 11 Dec 2023 17:33:28 GMT
etag: "f0edb133eff23e82ce02******b584"
server: AmazonS3
vary: Accept-Encoding
x-cache: Miss from cloudfront
via: 1.1 b12493f4f82b360a236f8747***********a.cloudfront.net (CloudFront)
x-amz-cf-pop: TLV50-C2
x-amz-cf-id: u4Egm965M6u_IEOv******Xw_YLGvJkZsges_FBoTtBQ==
vary: Origin
What further steps can I take to resolve this CORS issue?


