From dc0091326156aaeda566151b65fe8d49097750b9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 21 Oct 2016 12:28:32 +0200 Subject: Client: avoid "quit friends" to appear during the pending request --- server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'server.js') diff --git a/server.js b/server.js index f24b25f4d..d540c301b 100644 --- a/server.js +++ b/server.js @@ -68,22 +68,22 @@ const apiRoute = '/api/' + constants.API_VERSION app.use(apiRoute, routes.api) // Static files -app.use('/client', express.static(path.join(__dirname, '/client/dist'), { maxAge: 0 })) +app.use('/client', express.static(path.join(__dirname, '/client/dist'), { maxAge: constants.STATIC_MAX_AGE })) // 404 for static files not found app.use('/client/*', function (req, res, next) { res.sendStatus(404) }) const torrentsPhysicalPath = path.join(__dirname, config.get('storage.torrents')) -app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: '7d' })) +app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) // Videos path for webseeding const videosPhysicalPath = path.join(__dirname, config.get('storage.videos')) -app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: '7d' })) +app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) // Thumbnails path for express const thumbnailsPhysicalPath = path.join(__dirname, config.get('storage.thumbnails')) -app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: '7d' })) +app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) // Client application app.use('/*', function (req, res, next) { -- cgit v1.2.3