CDN unable to access assets from origin

I am not sure this is a bug. The “flipping” only happens in an AWS environment where you configure all s3 settings via ENV and then s3 acts as an origin for assets.

If you have s3 configured via env BE SURE to set DISCOURSE_S3_CDN_URL and BE SURE to run rake s3:upload_assets, note this is a very advanced setup that I am working on now so it has to be all configured just-so.