[feature] Object store custom URL (S3) #2574
Labels
config
Something needs to be made configurable, or there's a config issue
enhancement
New feature or request
storage/media
Issues related to how we store and serve media
Is your feature request related to a problem ?
For the purpose of being able to use a separate caching proxy, CDN acceleration and other things together with object storage for media and emoji, GoToSocial needs to construct a URL with a different base than the bucket URL/endpoint that it can return to clients.
Imagine for example GoToSocial using an S3 bucket, but the owner wanting the data itself to be accessed through a Cloudfront distribution, a Fastly CDN, or even just their own caching proxy. This can also facilitate migration between different object store backends, as the URL constructed and given to clients by GoToSocial in API responses would not have to change.
Describe the solution you'd like.
We should add a configuration option to GoToSocial that lets people define what the "external" URL should be for their bucket and use that when constructing media references.
It is paramount that this is implemented in such a way that the bucket name is not automatically interpolated into the constructed URL, as that's often not valid when using a CDN distribution. The endpoint should be taken as is, with only the path to the media object within the bucket appended to it.
Describe alternatives you've considered.
NONE
Additional context.
We have a whole host of issues on the issue tracker that are variations of this one. I'm going to link those into here and close them so we have a single tracking issue for this feature request.
The text was updated successfully, but these errors were encountered: