feat: added cache control header

pull/243/head
Josh Moore 1 year ago
parent a989da79d8
commit a518f45b87

@ -113,6 +113,7 @@ router.get('/direct/:fakeId', async (req, res) => {
// Configure response headers
res.type(meta!.mimetype)
.header('Content-Disposition', `inline; filename="${meta!.filename}"`)
.header('Cache-Control', 'public, max-age=31536000, immutable')
.header('Accept-Ranges', 'bytes');
// Send the file (thanks to https://stackoverflow.com/a/67373050)

Loading…
Cancel
Save