I'm trying to figure out why my CldouFront distribution, which points to my own domain, is resulting in http/2 302 results, rather than 200's.
My actual file is here:
~ curl -I https://svelte.mylibrary.io/assets/Home.e42d622a.js
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
X-Powered-By: Express
Access-Control-Allow-Origin: *
Accept-Ranges: bytes
Cache-Control: public, max-age=432000
Last-Modified: Sun, 23 Jan 2022 19:03:12 GMT
Etag: W/"15bd5-17e88522580"
Content-Type: application/javascript; charset=UTF-8
Content-Length: 89045
Vary: Accept-Encoding
Date: Sun, 23 Jan 2022 19:08:04 GMT
Via: 1.1 vegur
This is what I'm seeing when I request it via my CloudFront distribution
~ curl -I https://d3u39p1wo246y.cloudfront.net/assets/Home.e42d622a.js
HTTP/2 302
content-type: text/plain; charset=utf-8
content-length: 73
location: https://svelte.mylibrary.io/assets/Home.e42d622a.js
server: Cowboy
x-powered-by: Express
date: Sun, 23 Jan 2022 19:08:14 GMT
via: 1.1 vegur, 1.1 e1cb26f55af020d51729c02b0fb5db98.cloudfront.net (CloudFront)
vary: Origin
x-cache: Miss from cloudfront
x-amz-cf-pop: DFW50-C1
x-amz-cf-id: 33uqK_-E-U-Sfxm4Zava7VATMWQrZ-vBxeM49wR12LB2RRGocEuP7Q==
There's nothing too crazy about my CloudFront distribution. I've set my domain to svelte.mylibrary.io, and I've enabled CORS with preflight.
Is there something in the response headers of my own file that CloudFront is not liking, such that it refuses to send the 200 onward?
The domain is hosted on Heroku, and served up by Express's static middleware.
Some info on the CloudFront setup
EDIT
I have another CF distribution for my top-level mylibrary.io domain, and it successfully forwards the 200 result
~ curl -I https://mylibrary.io/assets/FlexRow.60393e4b.js
HTTP/1.1 200 OK
Server: Cowboy
Connection: keep-alive
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=432000
Last-Modified: Sun, 23 Jan 2022 19:02:40 GMT
Etag: W/"137-17e8851a880"
Content-Type: application/javascript; charset=UTF-8
Content-Length: 311
Vary: Accept-Encoding
Date: Sun, 23 Jan 2022 19:31:55 GMT
Via: 1.1 vegur
~ curl -I https://d2esd5amemogpi.cloudfront.net/assets/FlexRow.60393e4b.js
HTTP/2 200
content-type: application/javascript; charset=UTF-8
content-length: 311
server: Cowboy
x-powered-by: Express
accept-ranges: bytes
cache-control: public, max-age=432000
last-modified: Sun, 23 Jan 2022 19:02:40 GMT
etag: W/"137-17e8851a880"
date: Sun, 23 Jan 2022 19:23:55 GMT
via: 1.1 vegur, 1.1 6c6707b9b2a2151353d87b53eeed3030.cloudfront.net (CloudFront)
vary: Accept-Encoding
vary: Origin
x-cache: Miss from cloudfront
x-amz-cf-pop: DFW53-C1
x-amz-cf-id: hnosyh2UKCfU8hfCnISVmrHPeF7OBT5p7V4Gdh2wAqCrA2GA94fHSw==

