Files
tailscale/tsweb
James Tucker 4f88a7ba46 tsweb/vcstime: add a VCS-time-stamped file system wrapper for embed.FS
embed.FS stores and serves no ModTime: files report a zero ModTime,
which disables HTTP caching semantics when served with net/http: no
Last-Modified header is sent and If-Modified-Since requests are never
answered with a 304.

vcstime.FS wraps an fs.FS (typically an embed.FS) and reports the
vcs.time commit time from the binary's build info as the modification
time of files that have no real timestamp of their own, enabling
http.FS to provide working cache headers for clean builds. Files that
already have a real timestamp are passed through untouched, and
binaries built without VCS stamping degrade to the file system's own
behavior.

Updates tailscale/corp#48172

Signed-off-by: James Tucker <james@tailscale.com>
2026-09-16 14:44:08 -07:00
..
2026-07-10 17:39:16 -07:00