diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-12 14:57:57 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-02-16 10:36:44 +0100 |
commit | 0472d474fdadd05211fb4f90ce275801db515d08 (patch) | |
tree | ab7bacb011ac579ae876acb38cfd596add99120a /server/controllers/static.ts | |
parent | c15aff666d20bb020fff46474d23b0559a8ab262 (diff) | |
download | PeerTube-0472d474fdadd05211fb4f90ce275801db515d08.tar.gz PeerTube-0472d474fdadd05211fb4f90ce275801db515d08.tar.zst PeerTube-0472d474fdadd05211fb4f90ce275801db515d08.zip |
Remove deprecated static routes
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r-- | server/controllers/static.ts | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts index a7b28704c..a645c496b 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts | |||
@@ -93,25 +93,6 @@ staticRouter.use( | |||
93 | express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist | 93 | express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist |
94 | ) | 94 | ) |
95 | 95 | ||
96 | // DEPRECATED: use lazy-static route instead | ||
97 | const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR | ||
98 | staticRouter.use( | ||
99 | STATIC_PATHS.AVATARS, | ||
100 | express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist | ||
101 | ) | ||
102 | |||
103 | // DEPRECATED: use lazy-static route instead | ||
104 | staticRouter.use( | ||
105 | STATIC_PATHS.PREVIEWS + ':uuid.jpg', | ||
106 | asyncMiddleware(getPreview) | ||
107 | ) | ||
108 | |||
109 | // DEPRECATED: use lazy-static route instead | ||
110 | staticRouter.use( | ||
111 | STATIC_PATHS.VIDEO_CAPTIONS + ':videoId-:captionLanguage([a-z]+).vtt', | ||
112 | asyncMiddleware(getVideoCaption) | ||
113 | ) | ||
114 | |||
115 | // robots.txt service | 96 | // robots.txt service |
116 | staticRouter.get('/robots.txt', | 97 | staticRouter.get('/robots.txt', |
117 | asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.ROBOTS)), | 98 | asyncMiddleware(cacheRoute()(ROUTE_CACHE_LIFETIME.ROBOTS)), |