Headers for optimized asset

Hello, how can I set the headers for the css and js file which are made after asset optimization?
I have a _headers file in my project but these headers don’t apply to the files made by optimization

You won’t be able to set custom headers on assets that we optimize - if you need to set custom headers on an asset (hopefully you aren’t changing the cache-control - we advise against that and it isn’t needed on our system), you’ll have to disable asset optimization and redeploy to make that work.

Thank you for the reply, I have disabled optimization for css/js. I have optimized the css/js by myself in webpack and got the files smaller than the optimized ones.
And the custom headers work now.
For security I wanted to set the X-Content-Type-Options: nosniff header which the optimized files don’t have.(tested the website with Dareboost.com and it hinted to use this header for security).