Custom headers for Large Media

I’ve tried searching for everything even remotely related to this issue and I found nothing. Neither information that it can’t be done nor anything saying that it would be different than setting custom headers for any other file.

_headers

/backgrounds/*
    Cache-Control: public, max-age=31536000
/notifications/*
    Cache-Control: public, max-age=31536000

2 header rules processed
All header rules deployed without errors.

For “notifications” it works as intended. But for “backgrounds” so files that I have LFS set-up it does absolutely nothing. Adding a completely new file there didn’t help either. I keep getting “public, max-age=0, must-revalidate”.

https://caching--ocean-hero.netlify.com/notifications/4.jpeg
https://caching--ocean-hero.netlify.com/backgrounds/NTP_background_social_1.jpg

Hi, @Pentiado, I’m seeing the same thing. “The same thing”, meaning the header rules are defined correctly but not working for the Netlify Large Media (NLM) assets.

I’ve asked out developers about this and expect to have more information for you soon once I get a response from them.

1 Like

Hi, @Pentiado. I did confirm that files in NLM do not have header rules applied to them.

I filed an issue for this and I’ve cross-linked this topic to the issue for tracking.

If/when this issue is resolved will follow-up here in this forum topic to let you know about it. If there are other questions, please let us know.

Hi @luke!

That is unfortunate but thanks for info.
Anyway, I’m glad I found an issue that resolving will make Netlify better : )