add public cache to /media imgs

This commit is contained in:
lesion
2021-11-09 12:40:32 +01:00
parent 0219b03769
commit 2a047b22b5

View File

@@ -88,8 +88,8 @@ module.exports = {
serveStatic () {
const router = express.Router()
// serve logo, favicon, event's images/thumb
router.use('/media/', express.static(config.upload_path))
// serve event's images/thumb
router.use('/media/', express.static(config.upload_path, { immutable: true, maxAge: '1y' } ))
router.use('/noimg.svg', express.static('./static/noimg.svg'))
router.use('/logo.png', (req, res, next) => {