I have created an app using React.js (with create-react-app) and I cannot find a way to change the cache policy (I am interested in max-age) for my static assets. By default, the static assets of my app (including when I use the production build with 'npm run build') have a max-age of 0.
All I found in the official create-react-app docs was this: https://create-react-app.dev/docs/production-build/#static-file-caching
It did not help me change the cache policy for my static assets (I have images).
I also tried using the "fetch" method and setting a custom header, but I ended up having a duplicate value "max-age=99999, max-age=0". It looks like create-react-app bypasses your custom headers when it comes to cache policy.
How do I set a custom header? Thank in advance!