mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Remove quotes from max-age in cache-control
This commit is contained in:
@@ -19,7 +19,7 @@ const checkCacheMiddleware: RequestHandler = asyncHandler(async (req, res, next)
|
||||
// Set cache-control header
|
||||
if (env.CACHE_AUTO_PURGE !== true) {
|
||||
const expiresAt = await cache.get(`${key}__expires_at`);
|
||||
const maxAge = `max-age="${expiresAt - Date.now()}"`;
|
||||
const maxAge = `max-age=${expiresAt - Date.now()}`;
|
||||
const access = !!req.accountability?.role === false ? 'public' : 'private';
|
||||
res.setHeader('Cache-Control', `${access}, ${maxAge}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user