add public cache to /media imgs
This commit is contained in:
@@ -88,8 +88,8 @@ module.exports = {
|
|||||||
|
|
||||||
serveStatic () {
|
serveStatic () {
|
||||||
const router = express.Router()
|
const router = express.Router()
|
||||||
// serve logo, favicon, event's images/thumb
|
// serve event's images/thumb
|
||||||
router.use('/media/', express.static(config.upload_path))
|
router.use('/media/', express.static(config.upload_path, { immutable: true, maxAge: '1y' } ))
|
||||||
router.use('/noimg.svg', express.static('./static/noimg.svg'))
|
router.use('/noimg.svg', express.static('./static/noimg.svg'))
|
||||||
|
|
||||||
router.use('/logo.png', (req, res, next) => {
|
router.use('/logo.png', (req, res, next) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user