מה עלי להזין בהגדרות S3 CDN אם אין לי CDN?

סיכום מבוסס בינה מלאכותית

In a Support thread titled What should I enter in the S3 CDN settings if I don’t have a CDN?, Richie reports a new admin warning in Discourse 2.7.0.beta1 advising that S3 uploads lack a CDN, which may increase costs and slow performance. Richie’s site uses S3 but no CDN, and he’s unsure whether entering the S3 bucket URL (e.g., https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/) into the s3 cdn url field would break image URLs by duplicating the domain. He’s hesitant to change anything since the site currently works fine and fears unintended consequences. Falco asks if the issue is theoretical or observed, and Richie confirms it’s speculative. Falco encourages testing the setting in a safe environment. pfaffman suggests simply ignoring the warning if no CDN is desired, noting that hiding it via CSS is possible, and recommends BunnyCDN as a low-cost, easy-to-setup alternative. No one confirms that entering the S3 URL breaks anything — it remains untested by the original poster.

Hi everyone.

A new advice message has appeared on my Discourse admin page after a recent update to 2.7.0.beta1 ( e0c952290b )

It says:

Our Discourse does indeed use S3 for storage but it does not have a CDN in place of any shape or form.

@Falco suggested entering the S3 bucket URL in to the s3 cdn url settings box but I’m not sure what affect that might then have elsewhere.

I’m also not fully sure what my S3 bucket URL would be :man_facepalming:

An example S3 URL to a user-uploaded image is:

https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/original/3X/2/1/21365d3a8c03c3f309dd78ca51f517973618f2a0.jpeg

Does that mean my bucket URL is:

https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/

:thinking:

If I do enter that URL in to the s3 cdn url settings box and then rebake several hundred thousand posts, would their served up URL not then be:

https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/original/3X/2/1/21365d3a8c03c3f309dd78ca51f517973618f2a0.jpeg

Meaning no user images would work anymore? :man_shrugging:

In an ideal world, I’d simply like to click “Ok, thanks for the heads up!” and dismiss that info/alert/advice from our admin page. However, I suspect that would actually be quite a large core change so we’ll skip that idea.

Right now, everything is working fine and has been for years. I am very reluctant and nervous of changing a setting that I don’t fully understand to the point where I’m simply going to pretend I can’t see this piece of advice every time I look at the admin panel.

I’m guessing I will still see any other future admin panel warnings, this one one prevent others from appearing, will it?

Any advice, insight or suggestions welcomed please.

Did this happen or are you theorizing ?

I’ve not changed a thing - this is 100% speculation (and fear of breaking something that isn’t currently broken) :blush:

angry lilo and stitch GIF

Why don’t your experiment before going wild with the speculation ? :stuck_out_tongue:

Set the setting, refresh the page, try to upload an image in a post, see that it work fine, etc.

If you want to ignore the advice, why not just ignore the message? You could probably hide it with CSS, or you could just pretend it’s not there. Configuring a fake CDN seems like a bad idea.

BunnyCDN is cheap and easy to configure.