mirror of
https://github.com/tailscale/tailscale.git
synced 2026-09-21 19:15:17 -04:00
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>