diff --git a/README.md b/README.md index 53a2f58f..529588c4 100644 --- a/README.md +++ b/README.md @@ -37,12 +37,12 @@ pnpm run start Or, if you prefer to use a container: ```sh -docker run -d -p 3000:3000 ghcr.io/coracle-social/flotilla:latest +docker run -d -p 3000:3000 gitea.coracle.social/coracle/flotilla:latest ``` Alternatively, you can copy the build files into a directory of your choice and serve it yourself: ```sh mkdir ./mount -docker run -v ./mount:/app/mount ghcr.io/coracle-social/flotilla:latest bash -c 'cp -r build/* mount' +docker run -v ./mount:/app/mount gitea.coracle.social/coracle/flotilla:latest bash -c 'cp -r build/* mount' ``` diff --git a/server.js b/server.js index 4b9df7a2..738a6189 100644 --- a/server.js +++ b/server.js @@ -247,6 +247,14 @@ app.use( : "public, max-age=3600" context.header("Cache-Control", cacheControl) + + // Immutable assets are content-hashed by Vite, so the filename is itself a + // stable content identifier. Exposing it as an ETag lets clients that + // revalidate explicitly (e.g. emoji-picker-element checks its data source + // on every load) skip re-downloading large files when nothing changed. + if (isImmutable) { + context.header("ETag", `"${path.basename(filePath)}"`) + } }, }), )