Add use_last_modified(false) to the NamedFile builder, because Docker isn't preserving timestamps.
Since we're already using etags, Last-Modified is only getting in the way, I think. Although each deploy has new .wasm and .js files, our sounds aren't changing, but the first time each person logs in, the sounds have to be downloaded again because the timestamps of the files are coming from the docker image we rebuild on each deploy.
FWIW, I skimmed the docker documentation to see if I could preserve the timestamps from the host where the image is built and I didn't see anything. That's super surprising to me and I'm guessing there's jiggery pokery we could do to preserve the timestamps, but ditching Last-Modified should work fine for now.
Ugh. Turns out the etags that are generated change with deploys, so this doesn't really help. I'll need to read up about etags and perhaps how Actix Web implements them.
Add
use_last_modified(false)
to theNamedFile
builder, because Docker isn't preserving timestamps.Since we're already using etags,
Last-Modified
is only getting in the way, I think. Although each deploy has new.wasm
and.js
files, our sounds aren't changing, but the first time each person logs in, the sounds have to be downloaded again because the timestamps of the files are coming from the docker image we rebuild on each deploy.FWIW, I skimmed the docker documentation to see if I could preserve the timestamps from the host where the image is built and I didn't see anything. That's super surprising to me and I'm guessing there's jiggery pokery we could do to preserve the timestamps, but ditching
Last-Modified
should work fine for now.