# Assets not serving from CDN in latest update

**URL:** <https://meta.discourse.org/t/assets-not-serving-from-cdn-in-latest-update/140705>\
**Category:** Product Support\
**Created:** [5 februari 2020 om 10:56 UTC](https://meta.discourse.org/t/assets-not-serving-from-cdn-in-latest-update/140705 "2020-02-05T10:56:00Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![eatcodetravel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eatcodetravel/32/94385_2.png) [@eatcodetravel](https://meta.discourse.org/u/eatcodetravel)\
**Post date:** [5 februari 2020 om 10:56 UTC](https://meta.discourse.org/t/assets-not-serving-from-cdn-in-latest-update/140705/1 "2020-02-05T10:56:00Z")

</div>

Hello!

I couldn’t figure out why in the latest update our installation stopped serving assets from the CDN. We are using Cloudfront and it was working good to serve both uploads and assets, but it looks like in the latest update assets are serving from the server instead.

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/9/096155d097c264434deee6869c3f45e481486af7.png)

Another issue we are having is if we pass the variable `DISCOURSE_CDN_URL`, Discourse starts requesting assets that are not being generated or uploaded by the `s3:upload_assets` task (stylesheets for example). This breaks completely the site with a white page. This post mentions something similar.

> [@DISCOURSE\_CDN\_URL breaks rebuild/restore](https://meta.discourse.org/t/discourse-cdn-url-breaks-rebuild-restore/136844):
>
> EDIT: Well, it took me 18 hours, but it seems that defining DISCOURSE\_CDN\_URL keeps (at least) this site from rebuilding and/or functioning after a restore. I guess the next thing to test is doing a build without DISCOURSE\_CDN\_URL and then cranking up the container with the ENV var set. What I knew before I had this problem yesterday but thought it went away, but it turns out that I restored a month-old database. Restoring the recent database kills the site. I was able to build the site from s…

Any help would be greatly appreciated.

Thanks!

---

_[View the full topic](https://meta.discourse.org/t/assets-not-serving-from-cdn-in-latest-update/140705)._
