aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-11-01 19:50:56 +0100
committerChocobozzz <florian.bigard@gmail.com>2016-11-01 19:50:56 +0100
commit8c862bf9fd88f700cd071a898de9d288932f8148 (patch)
tree6545432e618230f1501fdb45d6cb648d226b6f9c /server.js
parentb65c27aaf7f6ea193d8f3bbf6fe4220f16219e06 (diff)
downloadPeerTube-8c862bf9fd88f700cd071a898de9d288932f8148.tar.gz
PeerTube-8c862bf9fd88f700cd071a898de9d288932f8148.tar.zst
PeerTube-8c862bf9fd88f700cd071a898de9d288932f8148.zip
Server: fix static paths
Diffstat (limited to 'server.js')
-rw-r--r--server.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/server.js b/server.js
index 18d9a087c..a7d7e781c 100644
--- a/server.js
+++ b/server.js
@@ -77,15 +77,15 @@ app.use('/client/*', function (req, res, next) {
77 res.sendStatus(404) 77 res.sendStatus(404)
78}) 78})
79 79
80const torrentsPhysicalPath = path.join(__dirname, constants.CONFIG.STORAGE.TORRENTS_DIR) 80const torrentsPhysicalPath = constants.CONFIG.STORAGE.TORRENTS_DIR
81app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) 81app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE }))
82 82
83// Videos path for webseeding 83// Videos path for webseeding
84const videosPhysicalPath = path.join(__dirname, constants.CONFIG.STORAGE.VIDEOS_DIR) 84const videosPhysicalPath = constants.CONFIG.STORAGE.VIDEOS_DIR
85app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) 85app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: constants.STATIC_MAX_AGE }))
86 86
87// Thumbnails path for express 87// Thumbnails path for express
88const thumbnailsPhysicalPath = path.join(__dirname, constants.CONFIG.STORAGE.THUMBNAILS_DIR) 88const thumbnailsPhysicalPath = constants.CONFIG.STORAGE.THUMBNAILS_DIR
89app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) 89app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE }))
90 90
91// Client application 91// Client application