aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/static.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r--server/controllers/static.ts15
1 files changed, 13 insertions, 2 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts
index 75e30353c..4fd58f70c 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -34,13 +34,18 @@ staticRouter.use(
34) 34)
35 35
36// Videos path for webseeding 36// Videos path for webseeding
37const videosPhysicalPath = CONFIG.STORAGE.VIDEOS_DIR
38staticRouter.use( 37staticRouter.use(
39 STATIC_PATHS.WEBSEED, 38 STATIC_PATHS.WEBSEED,
40 cors(), 39 cors(),
41 express.static(videosPhysicalPath) 40 express.static(CONFIG.STORAGE.VIDEOS_DIR, { fallthrough: false }) // 404 because we don't have this video
42) 41)
43staticRouter.use( 42staticRouter.use(
43 STATIC_PATHS.REDUNDANCY,
44 cors(),
45 express.static(CONFIG.STORAGE.REDUNDANCY_DIR, { fallthrough: false }) // 404 because we don't have this video
46)
47
48staticRouter.use(
44 STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension', 49 STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension',
45 asyncMiddleware(videosGetValidator), 50 asyncMiddleware(videosGetValidator),
46 asyncMiddleware(downloadVideoFile) 51 asyncMiddleware(downloadVideoFile)
@@ -131,6 +136,12 @@ staticRouter.use('/.well-known/dnt/',
131 } 136 }
132) 137)
133 138
139staticRouter.use('/.well-known/change-password',
140 (_, res: express.Response) => {
141 res.redirect('/my-account/settings')
142 }
143)
144
134// --------------------------------------------------------------------------- 145// ---------------------------------------------------------------------------
135 146
136export { 147export {