I self-hosted asciinema on fly.io, set the s3 env variables, recording and uploading works. Playing the cast gives me this emoji . The issue? Well, in the console, it says it’s a CORS problem.
Access to fetch at 'https://fly.storage.tigris.dev/asciinema-storage/uploads/asciicasts/30/00/3.cast?Amz-Expires=xSignedHeaders=host&X-Amz-Signature=x'
(redirected from 'https://my-url.com/a/<secret>.cast') from origin
'https://my-url.com' has been blocked by CORS policy:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Has anyone faced this before? A few things come to mind:
- public vs private bucket? But I set up the bucket access keys and secret.
- I am using fly.io’s new s3-compatible storage. Maybe it’s on their end.
- before switching to s3, I was mounting a local directory (things were playing), so it’s switching to s3 that caused the problem.
Things i have done:
- I tested the s3 link, and I can download or access the file by clicking on the same link with the CORS issue.
- I explored the self hosted docs and all the other docs for
cors
related and searched here no luck - Perhaps i need to setup Custom TLS certificate as the docs say?