Expiring URLs are served with Cache-Control: max-age=31536000, immutable #63
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verified against
mainat61f42e6.Both image paths set a one-year immutable cache header unconditionally:
internal/handlers/image.go:126internal/handlers/imageenc.go:76But both URL schemes expire. A signed URL carries
exp, and pixa returns 410/401 once it passes; an encrypted URL carries a TTL (the manual test pass recorded inTODO.mdconfirms attl=1URL returns 410 Gone after 3 s).So for any URL with a TTL shorter than a year — i.e. all of them — we instruct every intermediary cache and browser to keep serving the content for a year after we would refuse to serve it ourselves. Expiration becomes advisory the moment a CDN or corporate proxy is in front of pixa, which defeats the stated purpose of putting expiry in the signature ("to prevent replay attacks",
README.md:69-70).immutablecompounds it: conforming clients will not revalidate even on a forced reload.Definition of done
max-ageis clamped to the remaining lifetime of the URL (exp - nowfor signed URLs, remaining TTL for encrypted URLs), never exceeding it.immutableis still appropriate; it is defensible for content-addressed variants within the URL's own lifetime, but state the reasoning in the PR.max-agegreater than 60; same for a short-TTL encrypted URL.make checkgreen.