### Source Peer feedback, collected in #167: the files with a hash in the name are sent without a cache header (Sustainability). The fonts are now part of the app (#175), so they are in the same folder. ### What to do - [ ] On the VM, enable `mod_headers` and let the browser keep the built files for a year. Vite puts a hash of the content in the name of every file in `dist/assets/` (the JavaScript, the CSS and the fonts), so a changed file always gets a new name. Without a header the browser asks again every time. ```bash sudo a2enmod headers sudo systemctl restart apache2 ``` In the same site configuration as the proxy lines: ```apache <LocationMatch "^/project2/assets/"> Header set Cache-Control "public, max-age=31536000, immutable" </LocationMatch> ``` Do not set this for `index.html`, which has no hash in the name. - [ ] Check it with `curl -sI http://it2810-29.idi.ntnu.no/project2/assets/<a file from dist/assets>`: the answer should have `Cache-Control: public, max-age=31536000, immutable`. - [ ] Write the steps in `docs/VM_SETUP.md` (as a step after "Connect the frontend to the backend") and the measured result in `docs/SUSTAINABILITY.md`. - [ ] Together with #203: serve the JavaScript and CSS with Brotli. ### Done when - [ ] The VM answers with the `Cache-Control` header for files in `/project2/assets/`, and the steps are in `docs/VM_SETUP.md`. _Comment made with Claude Code in discussion with Ronja_