Cloudflare Pages - Cloudflare breaks CSS on own domain, works on .pages.dev

For Workes & Pages, what is the name of the domain?

https://thijmen-net.pages.dev and https://thijmen.net

What is the issue or error you’re encountering

The source CSS files are different on the custom domain from the same deployment on pages.dev.

What are the steps to reproduce the issue?

Hi! I hope I’m doing this forum correctly.

I just noticed that Cloudflare breaks the CSS of my Cloudflare Pages website. It does this because it attempts to minifies CSS, where (amongst other things) font-weight: 100 900; gets minified to font-weight: 100900; which I think breaks the site. Or something else being minified does.

Because the website - by Cloudflare being deployed to https://thijmen-net.pages.dev must theoretically be 100% identical to https://thijmen.net - because the latter is being CNAME’d to the first.

However, the CSS served on the custom domain is minimized and broken by Cloudflare! How could I report this to Cloudflare (if not by this forum?) and more importantly, disable this minification? See the attached pictures to show that the minification is actually breaking the css.

Thanks for reading, hopefully we can fix this!

Screenshot of the error

1 Like

Update, disabling ‘Auto Minify’ under Speed > Optimization actually fixed my issue! It also mentions that auto minify is deprecated, which I can understand because it is broken :). Perhaps Cloudflare could preemptively inform or automatically disable this feature for users who had it enabled when it was not yet broken/deprecated.

Thanks for reading along, my issue is solved. I hope that this post on the forum will help others!

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.