Invites and fixed image caching
This commit is contained in:
1 parent
1706a906f0
commit
693a30f437
7 files changed
+193
-5
No files matched your search
@@ -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`;
|
||||
Reference in new issue
Block a user