Defining DISCOURSE_S3_CDN_URL links to assets in S3 CDN URL

I guess this is because you are missing DISCOURSE_CDN_URL. We have it like this in our config

DISCOURSE_CDN_URL: 'https://d16zv78c963s69.cloudfront.net' # this points to the server
DISCOURSE_S3_CDN_URL: 'https://community-cdn-prod.debtcollective.org' # this points to S3 bucket

Stylesheets are fetched from the server so they use DISCOURSE_CDN_URL. JavaScript it’s uploaded to the S3 bucket and uses DISCOURSE_S3_CDN_URL. @Falco explained this to me here.