Allow video caching indefinitely

This commit is contained in:
Henri Bergius 2018-12-26 13:33:35 +01:00
parent b4d2dc33d7
commit e37f1526ec

View file

@ -17,7 +17,11 @@ app
.use(router.routes())
.use(router.allowedMethods())
.use(Static(path.resolve(__dirname, '../dist'), {}))
.use(Mount('/videos', Static(path.resolve(__dirname, '../videos'), {})));
.use(Mount('/videos', Static(path.resolve(__dirname, '../videos'), {
setHeaders: (res) => {
res.setHeader('cache-control', 'immutable');
},
})));
module.exports = app;
if (!module.parent) {