X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fstatic.ts;h=0d94cac9b0beec4366ac7d27d99d1f7fdda6177a;hb=64553e8809271df1113e9143426a27f234410a74;hp=1c04e4b11ebfaf1ce08a744d80e5afb791fbea1c;hpb=41fb13c330de629df2d23379209e79c7af0f2e9a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/static.ts b/server/controllers/static.ts index 1c04e4b11..0d94cac9b 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -32,14 +32,6 @@ staticRouter.use(cors()) Cors is very important to let other servers access torrent and video files */ -// FIXME: deprecated in 3.2, use lazy-statics instead -// Due to historical reasons, we can't really remove this controller -const torrentsPhysicalPath = CONFIG.STORAGE.TORRENTS_DIR -staticRouter.use( - STATIC_PATHS.TORRENTS, - express.static(torrentsPhysicalPath, { maxAge: 0 }) // Don't cache because we could regenerate the torrent file -) - // Videos path for webseed staticRouter.use( STATIC_PATHS.WEBSEED, @@ -69,6 +61,7 @@ staticRouter.get('/robots.txt', cacheRoute(ROUTE_CACHE_LIFETIME.ROBOTS), (_, res: express.Response) => { res.type('text/plain') + return res.send(CONFIG.INSTANCE.ROBOTS) } )