Don't cache torrent files
authorChocobozzz <florian.bigard@gmail.com>
Tue, 17 Oct 2017 12:21:18 +0000 (14:21 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Tue, 17 Oct 2017 12:21:18 +0000 (14:21 +0200)
server/controllers/static.ts

index b20bafc76d6cbf8152960671afe031246eb9c59e..8fbf9cc9741b209933472a7a21f0af526ef29f67 100644 (file)
@@ -18,7 +18,7 @@ const torrentsPhysicalPath = CONFIG.STORAGE.TORRENTS_DIR
 staticRouter.use(
   STATIC_PATHS.TORRENTS,
   cors(),
-  express.static(torrentsPhysicalPath, { maxAge: STATIC_MAX_AGE })
+  express.static(torrentsPhysicalPath, { maxAge: 0 }) // Don't cache because we could regenerate the torrent file
 )
 
 // Videos path for webseeding