Allow video caching indefinitely
This commit is contained in:
parent
b4d2dc33d7
commit
e37f1526ec
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue