Files
romm/backend
Sam Dornan b48f6003b5 fix(nginx): scope gzip_static to the build output
In the http block gzip_static was inherited by every location, including
the internal /library/ and /cache/ ones that serve downloads. RomM handles
.gz and .tar.gz ROMs, so a library holding both Game.nes and Game.nes.gz
answered a request for the first with the second's bytes under
Content-Encoding: gzip. Reproduced against nginx with a real upstream
issuing X-Accel-Redirect: the download returned 73 bytes of gzip instead
of the 3000-byte ROM. Clients that do not transparently decode, and Range
resumes over /cache/, would have written the wrong file to disk.

It now sits in the three locations that serve the frontend build, where a
.gz sibling can only be one the build wrote. Verified both directions: the
ROM download returns the plain 3000 bytes with no Content-Encoding, and a
fingerprinted asset is still served from its precompressed sibling.

The test now guards the invariant rather than the directive's presence:
gzip_static must be absent from the http block and from every location
serving files the build did not produce.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HDXxq3vAxJVGhm1pQuK8V7
2026-09-12 02:04:03 +00:00
..
2024-02-10 12:43:39 -05:00
2025-07-05 19:17:40 -04:00
2026-05-17 17:39:47 -04:00