)
// Videos path for webseeding
-const videosPhysicalPath = CONFIG.STORAGE.VIDEOS_DIR
staticRouter.use(
STATIC_PATHS.WEBSEED,
cors(),
- express.static(videosPhysicalPath)
+ express.static(CONFIG.STORAGE.VIDEOS_DIR, { fallthrough: false }) // 404 because we don't have this video
)
+staticRouter.use(
+ STATIC_PATHS.REDUNDANCY,
+ cors(),
+ express.static(CONFIG.STORAGE.REDUNDANCY_DIR, { fallthrough: false }) // 404 because we don't have this video
+)
+
staticRouter.use(
STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension',
asyncMiddleware(videosGetValidator),
(_, res: express.Response) => {
res.type('text/plain')
- return res.sendFile(join(root(), 'server/static/dnt-policy/dnt-policy-1.0.txt'))
+ return res.sendFile(join(root(), 'dist/server/static/dnt-policy/dnt-policy-1.0.txt'))
}
)
}
)
+staticRouter.use('/.well-known/change-password',
+ (_, res: express.Response) => {
+ res.redirect('/my-account/settings')
+ }
+)
+
// ---------------------------------------------------------------------------
export {