mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Improve static files cache
This commit is contained in:
parent
c928e1364f
commit
cd4cb177e6
3 changed files with 16 additions and 11 deletions
|
@ -68,13 +68,13 @@ staticRouter.use(
|
|||
const thumbnailsPhysicalPath = CONFIG.STORAGE.THUMBNAILS_DIR
|
||||
staticRouter.use(
|
||||
STATIC_PATHS.THUMBNAILS,
|
||||
express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE, fallthrough: false }) // 404 if the file does not exist
|
||||
express.static(thumbnailsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist
|
||||
)
|
||||
|
||||
const avatarsPhysicalPath = CONFIG.STORAGE.AVATARS_DIR
|
||||
staticRouter.use(
|
||||
STATIC_PATHS.AVATARS,
|
||||
express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE, fallthrough: false }) // 404 if the file does not exist
|
||||
express.static(avatarsPhysicalPath, { maxAge: STATIC_MAX_AGE.SERVER, fallthrough: false }) // 404 if the file does not exist
|
||||
)
|
||||
|
||||
// We don't have video previews, fetch them from the origin instance
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue