theming – Advagg with S3fs relative url() references inside of css files – broken image url DRUPAL 8

s3fs module with AdvAgg to store CSS/JS aggregates on the S3 stream wrapper

Without Aggregation (Works well). fetch from domain base url.

background-image: url(/themes/THEME/images/test.jpg);

Src of the image in CSS, which is pointing to the CNAME for S3

With Aggregation isn’t working. Because, my CNAME is different from my DOMAIN name.

background-image: url(https://CNAME_DOMAIN/themes/THEME/images/test.jpg);

I disabled it all OBSCURE options(admin/config/development/performance/advagg). But No luck.

Everytime, the CSS file content url() fetching from the CNAME url.