jimmy0017 wants to add AWS Cloudfront as a CDN to their Discourse site to improve performance. They have already moved objects like images to AWS S3, but are having trouble setting up Cloudfront as the DISCOURSE_CDN. Lilly suggests checking the official documentation, specifically this topic and this one. However, jimmy0017 is unsure about the setup, particularly the instruction to not configure DISCOURSE_CDN_URL. supermathie clarifies that DISCOURSE_S3_CDN is for S3 CDN, while DISCOURSE_CDN is for the app CDN, which jimmy0017 wants to utilize for a full app CDN. jimmy0017 has already configured S3 with Cloudfront for uploads, but is trying to cache more assets like user avatars.
We’ve moved the objects (such as image, and others) to AWS S3. Those have been great.
Now we want to speed up the site a bit more. How should I add the AWS cloudfront as the DISCOURSE_CDN?
I tried to setup myself. It works when I am using the forum-cdn. But as soon as I put the url into the discourse_cdn, the site becomes unusable and all images are having multiple redirects and stopped working.
I’ve already done this. The image of our site is on AWS S3 with cloudfront. I am trying to cache more such as the user_avatar image instead of hitting the server.