X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fstatic.ts;h=87bceba7afa23a39ee3ac3916eaa1f15561e66c3;hb=1808a1f8e4b7b102823492a2007a46929aebf189;hp=fe162991078b9d231058599e056af6688adfaae6;hpb=42cc1887afc80e10ff40675621fe683c76537a18;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/static.ts b/server/controllers/static.ts index fe1629910..87bceba7a 100644 --- a/server/controllers/static.ts +++ b/server/controllers/static.ts @@ -5,7 +5,7 @@ import { serveIndexHTML } from '@server/lib/client-html' import { ServerConfigManager } from '@server/lib/server-config-manager' import { HttpStatusCode } from '@shared/models' import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo/nodeinfo.model' -import { root } from '../helpers/core-utils' +import { root } from '@shared/core-utils' import { CONFIG, isEmailEnabled } from '../initializers/config' import { CONSTRAINTS_FIELDS, @@ -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,