Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Allow S3 bucket name to be blank to better support CDN with S3 buckets #1026

Closed
joelghill opened this issue Nov 12, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@joelghill
Copy link

Is your feature request related to a problem ?

I have configured an S3 storage bucket for server media. I also configured a CDN for said bucket at a subdomain.

When configuring the server, there do not appear to be any settings to allow for the CDN to function correctly. I can set the S3 host to the CDN url, but GTS inserts the bucket name in the media urls and this is inappropriate for the CDN.

Describe the solution you'd like.

Allow the S3 bucket name to be blank and document this use case in the config file. This should produce correct URLs

Describe alternatives you've considered.

None

Additional context.

I can provide my current server config, hostname, S3 bucket, CDN url, etc, if any of that will help.

@joelghill joelghill added the enhancement New feature or request label Nov 12, 2022
@tsmethurst tsmethurst changed the title Support CDN with S3 buckets [feature] Allow S3 bucket name to be blank to better support CDN with S3 buckets Nov 12, 2022
@joelghill
Copy link
Author

Did a little bit of research here and it looks like allowing a blank bucket name is probably not going to work, reading and writing to S3 needs a bucket name.

I think the solution here might be to add a new setting for a CDN endpoint. The S3 config would all be the same, however if a CDN is configured creating URLs to read media the CDN endpoint should be used instead of the S3 URL + bucket name.

theSuess added a commit to theSuess/gotosocial that referenced this issue Dec 2, 2022
Implements superseriousbusiness#864 and should speed up s3 based installations by a lot.

With more static urls, we can then also implement superseriousbusiness#1026 for even
better performance when used in conjunction with CDNs
NyaaaWhatsUpDoc pushed a commit that referenced this issue Dec 2, 2022
Implements #864 and should speed up s3 based installations by a lot.

With more static urls, we can then also implement #1026 for even
better performance when used in conjunction with CDNs
@daenney
Copy link
Member

daenney commented Jan 26, 2024

I'm going to close this in favour of #2574 where we've got the generic solution and different use cases documented. If you're still interested in this feature, feel free to subscribe to that issue.

@daenney daenney closed this as completed Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants