More aggressive image caching

main
Ashelyn Dawn 3 years ago
parent 005cb39270
commit a41292a022

@ -5,6 +5,8 @@ const ensureAdmin = require('./middleware/ensureAdmin')
router.get('/:uuid/:size', async (req, res) => {
const image = await db.item.getImage(req.params.uuid, req.params.size)
const cacheSeconds = 60 * 60 * 24;
res.set('Cache-Control', cacheSeconds);
res.set('Content-Type', image.mime_type)
res.end(image.file)
})

Loading…
Cancel
Save