Invites and fixed image caching
Deploy / deploy-dev (push) Skipped
Deploy / deploy-prod (push) Successful in 3m57s

This commit is contained in:
Corey Blais committed 2026-10-09 20:16:22 -04:00
1 parent 1706a906f0
commit 693a30f437
7 files changed
+193 -5

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
// Never cache a redirect to a signed storage URL: its lifetime is independent of
// the app token. Successful proxy responses cannot outlive the app token.
export const photoCacheControl = (mode: 'proxy' | 'redirect', expiresAt: number, now = Math.floor(Date.now() / 1000)) =>
mode === 'redirect' ? 'no-store' : `private, max-age=${Math.max(0, Math.min(900, expiresAt - now))}, must-revalidate`;