Question about download build files

Hey there,

I have a question in relation to my site “dainty-raindrop-e645a4”.

The application deployed there is a CRA react app and generally is working fine. The app loads a custom font file through CSS in order to style the page. The font is called LEMONMILK.woff (the caps being important).

Within my app, I load this font directly from CSS (i.e. using url(“/assets/fonts/LEMONMILK.woff”)). When testing my app locally, this loads fine, as expected. When I push to git and deploy to Netlify, the font still loads and works as expected. Great so far.

However, when I download the build files from Netlify directly, I’ve noticed that all the files in the project have been changed to lowercase. So when I look at my assets, the font is named lemonmilk.woff. This causes “404 file not found” errors in my external deployment as the file names differ in case. I can confirm this is the only difference by renaming the css property to lowercase, which causes it to load correctly.

While it seems farfetched that downloading the files would be renaming them, if I make a build locally, my font files are all uppercase, and when I look at the Network debugger for the Netlify deployment, I can see it loading the file using the original filename (in uppercase), so I’m fairly sure the build process isn’t doing anything funny.

Can you confirm if the build downloader is modifying the files when I request to download them? If this shouldn’t be happening, is there any obvious reason why the files would have different cases only after I download them?

I’m pretty confused, so any help would be great. Thanks!

Your website is not loading for me, but as far as I know, Netlify normalises URLs to lowercase.

This URL normalisation appears to be causing issues when downloading the build files. It only changes urls of the file names in the project, but not the names of the url references to the files. From what I can tell, this isn’t happening during the build, but instead only when I download build files.

Is there any way to disable this URL normalisation? I’m not sure why the URLs need to be changed during the download. If not, I may need to look into a different method of getting working build files.

Thanks for the response!

Hi,

URL normalization is part of Netlify’s CDN edge nodes’ operation which ensures the highest possible cache hit rate and the best performance for your site.

You can control the behavior of URLs to some extent using Netlify’s Pretty URLs feature. When Pretty URLs are enabled, Netlify forwards paths like /about to /about/ and rewrites paths like /about.html to /about/. You can check if Pretty URLs are enabled for your site in your site’s settings.