Commit Graph

4 Commits

Author SHA1 Message Date
Jōshin
9826f4a978
landscape: add public url base to S3 configuration
This enables using [Cloudflare R2][0] as a storage provider.

Cloudflare R2 is an S3-compatible API with a generous free tier; it
looks like it may cost nothing for most Urbit ships’ usage patterns.
The only hitch is that R2’s endpoint is not able to be configured to
be publicly readable; in order to [make a bucket public][1], you must
either use an r2.dev URL, or set up your own custom URL. Caching and
such is only supported on your own URL, so it sounds like that’s the
case they’re encouraging people to target.

This change enables R2 support by adding a configuration option to
set a public URL base. If it is non-empty, it replaces the origin
for any S3 upload URLs. A ship may use either its r2.dev URL or a
custom URL at its discretion. As a nice side benefit, this also
allows wrapping S3 access over a custom domain that you control.

[0]: https://www.cloudflare.com/developer-platform/r2/
[1]: https://developers.cloudflare.com/r2/buckets/public-buckets/
2024-01-19 13:32:48 -05:00
Hunter Miller
bedf6135a6 storage: update for presigned urls 2023-10-17 18:49:36 -05:00
Hunter Miller
a137ab6451 storage: use correct keys 2023-06-29 11:08:16 -05:00
Hunter Miller
d21f1e8ecc settings,storage: add new agents for migration 2023-05-04 09:53:06 -05:00