aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index be5db8fe8..6b0984186 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -551,16 +551,13 @@ const NSFW_POLICY_TYPES: { [ id: string ]: NSFWPolicyType } = {
551 551
552// Express static paths (router) 552// Express static paths (router)
553const STATIC_PATHS = { 553const STATIC_PATHS = {
554 PREVIEWS: '/static/previews/',
555 THUMBNAILS: '/static/thumbnails/', 554 THUMBNAILS: '/static/thumbnails/',
556 TORRENTS: '/static/torrents/', 555 TORRENTS: '/static/torrents/',
557 WEBSEED: '/static/webseed/', 556 WEBSEED: '/static/webseed/',
558 REDUNDANCY: '/static/redundancy/', 557 REDUNDANCY: '/static/redundancy/',
559 STREAMING_PLAYLISTS: { 558 STREAMING_PLAYLISTS: {
560 HLS: '/static/streaming-playlists/hls' 559 HLS: '/static/streaming-playlists/hls'
561 }, 560 }
562 AVATARS: '/static/avatars/',
563 VIDEO_CAPTIONS: '/static/video-captions/'
564} 561}
565const STATIC_DOWNLOAD_PATHS = { 562const STATIC_DOWNLOAD_PATHS = {
566 TORRENTS: '/download/torrents/', 563 TORRENTS: '/download/torrents/',
@@ -570,12 +567,14 @@ const STATIC_DOWNLOAD_PATHS = {
570const LAZY_STATIC_PATHS = { 567const LAZY_STATIC_PATHS = {
571 AVATARS: '/lazy-static/avatars/', 568 AVATARS: '/lazy-static/avatars/',
572 PREVIEWS: '/lazy-static/previews/', 569 PREVIEWS: '/lazy-static/previews/',
573 VIDEO_CAPTIONS: '/lazy-static/video-captions/' 570 VIDEO_CAPTIONS: '/lazy-static/video-captions/',
571 TORRENTS: '/lazy-static/torrents/'
574} 572}
575 573
576// Cache control 574// Cache control
577const STATIC_MAX_AGE = { 575const STATIC_MAX_AGE = {
578 SERVER: '2h', 576 SERVER: '2h',
577 LAZY_SERVER: '2d',
579 CLIENT: '30d' 578 CLIENT: '30d'
580} 579}
581 580
@@ -609,6 +608,10 @@ const FILES_CACHE = {
609 VIDEO_CAPTIONS: { 608 VIDEO_CAPTIONS: {
610 DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'video-captions'), 609 DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'video-captions'),
611 MAX_AGE: 1000 * 3600 * 3 // 3 hours 610 MAX_AGE: 1000 * 3600 * 3 // 3 hours
611 },
612 TORRENTS: {
613 DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'torrents'),
614 MAX_AGE: 1000 * 3600 * 3 // 3 hours
612 } 615 }
613} 616}
614 617