staticRouter.use(
STATIC_PATHS.WEBSEED,
cors(),
- express.static(videosPhysicalPath, { maxAge: STATIC_MAX_AGE })
+ express.static(videosPhysicalPath)
)
staticRouter.use(
STATIC_DOWNLOAD_PATHS.VIDEOS + ':id-:resolution([0-9]+).:extension',
}
// Cache control
-let STATIC_MAX_AGE = '30d'
+let STATIC_MAX_AGE = '2h'
// Videos thumbnail size
const THUMBNAILS_SIZE = {
}
location ~ ^/static/(thumbnails|avatars)/(.*)$ {
- add_header Cache-Control "public, max-age=31536000, immutable";
+ # Cache 2 hours
+ add_header Cache-Control "public, max-age=7200";
alias /var/www/peertube/storage/$1/$2;
}