aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/static.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-07-29 15:20:36 +0200
committerChocobozzz <me@florianbigard.com>2019-07-29 15:20:36 +0200
commitcd4cb177e6e35f69832304366c6f9df96600fb9e (patch)
tree4936951477b39cd471b8a70c96bf79a951d2c6ba /server/controllers/static.ts
parentc928e1364fbdff87f27fd982710b95426a250491 (diff)
downloadPeerTube-cd4cb177e6e35f69832304366c6f9df96600fb9e.tar.gz
PeerTube-cd4cb177e6e35f69832304366c6f9df96600fb9e.tar.zst
PeerTube-cd4cb177e6e35f69832304366c6f9df96600fb9e.zip
Improve static files cache
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 af7de562a..4296183a0 100644
--- a/server/controllers/static.ts
+++ b/server/controllers/static.ts
@@ -68,13 +68,13 @@ staticRouter.use(
68const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR 68const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR
69staticRouter.use( 69staticRouter.use(
70 STATIC_PATHS.THUMBNAILS, 70 STATIC_PATHS.THUMBNAILS,
71 express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE, fallthrough: false }) // 404 if the file does not exist 71 express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist
72) 72)
73 73
74const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR 74const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR
75staticRouter.use( 75staticRouter.use(
76 STATIC_PATHS.AVATARS, 76 STATIC_PATHS.AVATARS,
77 express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE, fallthrough: false }) // 404 if the file does not exist 77 express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist
78) 78)
79 79
80// We don't have video previews, fetch them from the origin instance 80// We don't have video previews, fetch them from the origin instance