diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-11-01 19:50:56 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-11-01 19:50:56 +0100 |
commit | 8c862bf9fd88f700cd071a898de9d288932f8148 (patch) | |
tree | 6545432e618230f1501fdb45d6cb648d226b6f9c | |
parent | b65c27aaf7f6ea193d8f3bbf6fe4220f16219e06 (diff) | |
download | PeerTube-8c862bf9fd88f700cd071a898de9d288932f8148.tar.gz PeerTube-8c862bf9fd88f700cd071a898de9d288932f8148.tar.zst PeerTube-8c862bf9fd88f700cd071a898de9d288932f8148.zip |
Server: fix static paths
-rw-r--r-- | server.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -77,15 +77,15 @@ app.use('/client/*', function (req, res, next) { | |||
77 | res.sendStatus(404) | 77 | res.sendStatus(404) |
78 | }) | 78 | }) |
79 | 79 | ||
80 | const torrentsPhysicalPath = path.join(__dirname, constants.CONFIG.STORAGE.TORRENTS_DIR) | 80 | const torrentsPhysicalPath = constants.CONFIG.STORAGE.TORRENTS_DIR |
81 | app.use(constants.STATIC_PATHS.TORRENTS, cors(), express.static(torrentsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) | 81 | app.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 |
84 | const videosPhysicalPath = path.join(__dirname, constants.CONFIG.STORAGE.VIDEOS_DIR) | 84 | const videosPhysicalPath = constants.CONFIG.STORAGE.VIDEOS_DIR |
85 | app.use(constants.STATIC_PATHS.WEBSEED, cors(), express.static(videosPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) | 85 | app.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 |
88 | const thumbnailsPhysicalPath = path.join(__dirname, constants.CONFIG.STORAGE.THUMBNAILS_DIR) | 88 | const thumbnailsPhysicalPath = constants.CONFIG.STORAGE.THUMBNAILS_DIR |
89 | app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) | 89 | app.use(constants.STATIC_PATHS.THUMBNAILS, express.static(thumbnailsPhysicalPath, { maxAge: constants.STATIC_MAX_AGE })) |
90 | 90 | ||
91 | // Client application | 91 | // Client application |