ctm / mb2-doc

Mb2, poker software
https://devctm.com
7 stars 2 forks source link

Use etag without last modified #1290

Closed ctm closed 6 months ago

ctm commented 6 months ago

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.

ctm commented 6 months ago

Deploying now.

ctm commented 6 months ago

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.

ctm commented 6 months ago

It just uses meta data. Oops.