How to apply an efficient caching policy for combined asset files?

Hi, as mentioned here before we can add the .js or .css suffix to combined assets:

<link href="{{ ['assets/less/theme.less']|theme }}.css" rel="stylesheet">

If I explicitly set a caching policy in my nginx settings, the combined assets don’t seem to be recognized as .js or .css files, and the caching policy is not applied.

location ~* \.(js|jpg|jpeg|gif|png|css|tgz|gz|rar|bz2|doc|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|woff|woff2|svg|webp)$ {
	etag on;
	if_modified_since exact;
	add_header Pragma "public";
	add_header Cache-Control "max-age=31536000, public";

In spite of above configuration, the combined css file for example returns cache-control: max-age=604800, public instead of max-age=31536000, public. Please note that all other mentioned extensions are correctly cached according to those settings.

This causes Lighthouse / Pagespeed Insights to state that our css and js files are not efficiently cached, which has some negative consequences. When optimizing for SEO, this is one of the points of criticism we’ve received.

Did anyone manage to apply a caching policy to the combined resources? If so, how did you solve it?