Serving things with Tigris on your own domain usually requires you to go through their custom domain flow, which means that you need to allocate a second domain for your static uploads (eg: cdn.example.com). We have a new middle ground for you: Tigris bucket statics. Tigris bucket statics let you serve a path of your application with the contents of a Tigris bucket.
One of the main reasons you’d want to do this is if you are moving your uploads from something like Backblaze B2 to Tigris. With Backblaze B2 you can use a custom domain, but you have to prefix the name of your bucket to every single path, like this:
cdn.example.com/file/mybucket/path/to/object
To mount mybucket on the same path as Backblaze B2, you can use a statics definition like this:
The guest_path directive also lets you change where the bucket is being served from. You can also use this for user uploads, or anything that would involve putting files in buckets. Imagine a photo upload app where the originals are stored in /orig in shashin-uploads and the optimized versions for the public are stored in /public:
Any data served from Tigris bucket(s) follows the Tigris pricing policy, which is basically free egress out of Tigris as mentioned in our pricing docs.
Great, I just wanted to confirm that Fly does not add on a data egress charge when using the statics feature introduced here, as opposed to serving directly out of Tigris using a Tigris URL. Is that correct?
Hi, I am actively exploring Tigris and I’d like to generate upload and download tokens (presigned urls) in combination with CNAMEd buckets. But when I try this I get an error. I don’t get an error when I use the global endpoint.
So my question is: is this even possible with custom domains? Or are the custom domains only meant for static file serving?
Hi @hakoptak - this is a current known limitation that presigned URL are specific to the standard host and not CNAME(ed) host. We can prioritize this if this is a blocking issue for you - Please let us know.
Functionally it’s not a deal breaker, but it would add value to branding and trust. But for now I can work around it by just using the global endpoint. At least it’s good to know that it was not yet possible. It saves me some banging my head against the wall