S3 buckets containing periods not allowed

So, I also wanted to put my uploads behind CloudfFlare, using Wasabi instead of S3, so no CloudFront available.

I ended up directly modifying the DB, and restarting discourse and it worked. Also, does https between CDN and S3 really matter if the bucket is public read only?

UPDATE site_settings SET value = 'uploads.domain.tld' WHERE name = 's3_upload_bucket';

2 Likes

Set the DISCOURSE_S3_CDN variable as explained in the #howto guides.

1 Like

I can set the CDN URL just fine, and point it directly to wasabi. But the only way to get it to go through cloudflare first is to have a CNAME on my domain pointing to s3.wasabisys.com, where the bucket name needs to be subdomain.your.domain.

Eg, I can’t have a bucket called xyz-uploads and use that behind cloudflare with a CNAME to s3.wasabisys.com

2 Likes

After lots of frustration and Googling, I’ve found this topic, and am surprised to see that it was created back in 2015, and that this is still an issue? It’s a valid use-case to want to use an S3 bucket with periods, and to use the static hosting feature of S3, and then to have CloudFlare in front of this with SSL. There is nothing wrong with this setup, except that Discourse currently prevents us from doing so.

If Discourse really wants to nanny all of the other users into protecting themselves against SSL issues with periods in S3 bucket names, then can it at least just display a link to some documentation for them to educate themselves, while also allowing people who know how to configure this correctly to do so?

1 Like