aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/static.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-24 18:02:23 +0200
committerChocobozzz <me@florianbigard.com>2018-07-24 18:03:40 +0200
commita8bf1d826e379dec03d25840c7c49c1f30168380 (patch)
tree5f122d1012f1e3267f218c0e8f155674454ca8d0 /server/controllers/static.ts
parenta8981e0b24ad41d9124344a780d878b08cef173b (diff)
downloadPeerTube-a8bf1d826e379dec03d25840c7c49c1f30168380.tar.gz
PeerTube-a8bf1d826e379dec03d25840c7c49c1f30168380.tar.zst
PeerTube-a8bf1d826e379dec03d25840c7c49c1f30168380.zip
404 on unknown thumbnail
Diffstat (limited to 'server/controllers/static.ts')
-rw-r--r--server/controllers/static.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/static.ts b/server/controllers/static.ts
index f10427f3e..3ccf624a7 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -48,13 +48,13 @@ staticRouter.use(
48const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR 48const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR
49staticRouter.use( 49staticRouter.use(
50 STATIC_PATHS.THUMBNAILS, 50 STATIC_PATHS.THUMBNAILS,
51 express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE }) 51 express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE, fallthrough: false }) // 404 if the file does not exist
52) 52)
53 53
54const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR 54const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR
55staticRouter.use( 55staticRouter.use(
56 STATIC_PATHS.AVATARS, 56 STATIC_PATHS.AVATARS,
57 express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE }) 57 express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE, fallthrough: false }) // 404 if the file does not exist
58) 58)
59 59
60// We don't have video previews, fetch them from the origin instance 60// We don't have video previews, fetch them from the origin instance