diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-24 18:02:23 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-24 18:03:40 +0200 |
commit | a8bf1d826e379dec03d25840c7c49c1f30168380 (patch) | |
tree | 5f122d1012f1e3267f218c0e8f155674454ca8d0 /server/controllers | |
parent | a8981e0b24ad41d9124344a780d878b08cef173b (diff) | |
download | PeerTube-a8bf1d826e379dec03d25840c7c49c1f30168380.tar.gz PeerTube-a8bf1d826e379dec03d25840c7c49c1f30168380.tar.zst PeerTube-a8bf1d826e379dec03d25840c7c49c1f30168380.zip |
404 on unknown thumbnail
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/static.ts | 4 |
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( | |||
48 | const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR | 48 | const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR |
49 | staticRouter.use( | 49 | staticRouter.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 | ||
54 | const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR | 54 | const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR |
55 | staticRouter.use( | 55 | staticRouter.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 |