diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-29 15:20:36 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-07-29 15:20:36 +0200 |
commit | cd4cb177e6e35f69832304366c6f9df96600fb9e (patch) | |
tree | 4936951477b39cd471b8a70c96bf79a951d2c6ba /server/controllers/static.ts | |
parent | c928e1364fbdff87f27fd982710b95426a250491 (diff) | |
download | PeerTube-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.ts | 4 |
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( | |||
68 | const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR | 68 | const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR |
69 | staticRouter.use( | 69 | staticRouter.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 | ||
74 | const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR | 74 | const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR |
75 | staticRouter.use( | 75 | staticRouter.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 |