ActivityPub-federated video streaming platform using P2P directly in your web browser
Server: add cache to static files
Chocobozzzc731ee4efdbc
diff --git a/server.js b/server.jsindex b2d9be9aaf..f24b25f4d9 100644--- a/server.js+++ b/server.js@@ -75,15 +75,15 @@ app.use('/client/*', function (req, res, next) {})const torrentsPhysicalPath = path.join(__dirname, config.get('storage.torrents'))-app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: 0 }))+app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: '7d' }))// Videos path for webseedingconst videosPhysicalPath = path.join(__dirname, config.get('storage.videos'))-app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: 0 }))+app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: '7d' }))// Thumbnails path for expressconst thumbnailsPhysicalPath = path.join(__dirname, config.get('storage.thumbnails'))-app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: 0 }))+app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: '7d' }))// Client applicationapp.use('/*', function (req, res, next) {