diff options
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index cab61948a..88bdd07fe 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -662,10 +662,15 @@ const NSFW_POLICY_TYPES: { [ id: string ]: NSFWPolicyType } = { | |||
662 | // Express static paths (router) | 662 | // Express static paths (router) |
663 | const STATIC_PATHS = { | 663 | const STATIC_PATHS = { |
664 | THUMBNAILS: '/static/thumbnails/', | 664 | THUMBNAILS: '/static/thumbnails/', |
665 | |||
665 | WEBSEED: '/static/webseed/', | 666 | WEBSEED: '/static/webseed/', |
667 | PRIVATE_WEBSEED: '/static/webseed/private/', | ||
668 | |||
666 | REDUNDANCY: '/static/redundancy/', | 669 | REDUNDANCY: '/static/redundancy/', |
670 | |||
667 | STREAMING_PLAYLISTS: { | 671 | STREAMING_PLAYLISTS: { |
668 | HLS: '/static/streaming-playlists/hls' | 672 | HLS: '/static/streaming-playlists/hls', |
673 | PRIVATE_HLS: '/static/streaming-playlists/hls/private/' | ||
669 | } | 674 | } |
670 | } | 675 | } |
671 | const STATIC_DOWNLOAD_PATHS = { | 676 | const STATIC_DOWNLOAD_PATHS = { |
@@ -745,12 +750,32 @@ const LRU_CACHE = { | |||
745 | }, | 750 | }, |
746 | ACTOR_IMAGE_STATIC: { | 751 | ACTOR_IMAGE_STATIC: { |
747 | MAX_SIZE: 500 | 752 | MAX_SIZE: 500 |
753 | }, | ||
754 | STATIC_VIDEO_FILES_RIGHTS_CHECK: { | ||
755 | MAX_SIZE: 5000, | ||
756 | TTL: parseDurationToMs('10 seconds') | ||
757 | }, | ||
758 | VIDEO_TOKENS: { | ||
759 | MAX_SIZE: 100_000, | ||
760 | TTL: parseDurationToMs('8 hours') | ||
748 | } | 761 | } |
749 | } | 762 | } |
750 | 763 | ||
751 | const RESUMABLE_UPLOAD_DIRECTORY = join(CONFIG.STORAGE.TMP_DIR, 'resumable-uploads') | 764 | const DIRECTORIES = { |
752 | const HLS_STREAMING_PLAYLIST_DIRECTORY = join(CONFIG.STORAGE.STREAMING_PLAYLISTS_DIR, 'hls') | 765 | RESUMABLE_UPLOAD: join(CONFIG.STORAGE.TMP_DIR, 'resumable-uploads'), |
753 | const HLS_REDUNDANCY_DIRECTORY = join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls') | 766 | |
767 | HLS_STREAMING_PLAYLIST: { | ||
768 | PUBLIC: join(CONFIG.STORAGE.STREAMING_PLAYLISTS_DIR, 'hls'), | ||
769 | PRIVATE: join(CONFIG.STORAGE.STREAMING_PLAYLISTS_DIR, 'hls', 'private') | ||
770 | }, | ||
771 | |||
772 | VIDEOS: { | ||
773 | PUBLIC: CONFIG.STORAGE.VIDEOS_DIR, | ||
774 | PRIVATE: join(CONFIG.STORAGE.VIDEOS_DIR, 'private') | ||
775 | }, | ||
776 | |||
777 | HLS_REDUNDANCY: join(CONFIG.STORAGE.REDUNDANCY_DIR, 'hls') | ||
778 | } | ||
754 | 779 | ||
755 | const RESUMABLE_UPLOAD_SESSION_LIFETIME = SCHEDULER_INTERVALS_MS.REMOVE_DANGLING_RESUMABLE_UPLOADS | 780 | const RESUMABLE_UPLOAD_SESSION_LIFETIME = SCHEDULER_INTERVALS_MS.REMOVE_DANGLING_RESUMABLE_UPLOADS |
756 | 781 | ||
@@ -971,9 +996,8 @@ export { | |||
971 | PEERTUBE_VERSION, | 996 | PEERTUBE_VERSION, |
972 | LAZY_STATIC_PATHS, | 997 | LAZY_STATIC_PATHS, |
973 | SEARCH_INDEX, | 998 | SEARCH_INDEX, |
974 | RESUMABLE_UPLOAD_DIRECTORY, | 999 | DIRECTORIES, |
975 | RESUMABLE_UPLOAD_SESSION_LIFETIME, | 1000 | RESUMABLE_UPLOAD_SESSION_LIFETIME, |
976 | HLS_REDUNDANCY_DIRECTORY, | ||
977 | P2P_MEDIA_LOADER_PEER_VERSION, | 1001 | P2P_MEDIA_LOADER_PEER_VERSION, |
978 | ACTOR_IMAGES_SIZE, | 1002 | ACTOR_IMAGES_SIZE, |
979 | ACCEPT_HEADERS, | 1003 | ACCEPT_HEADERS, |
@@ -1007,7 +1031,6 @@ export { | |||
1007 | VIDEO_FILTERS, | 1031 | VIDEO_FILTERS, |
1008 | ROUTE_CACHE_LIFETIME, | 1032 | ROUTE_CACHE_LIFETIME, |
1009 | SORTABLE_COLUMNS, | 1033 | SORTABLE_COLUMNS, |
1010 | HLS_STREAMING_PLAYLIST_DIRECTORY, | ||
1011 | JOB_TTL, | 1034 | JOB_TTL, |
1012 | DEFAULT_THEME_NAME, | 1035 | DEFAULT_THEME_NAME, |
1013 | NSFW_POLICY_TYPES, | 1036 | NSFW_POLICY_TYPES, |