From a056ca4813c82f490dcd31ac97a64d6bf76d3dcc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 28 Oct 2020 15:24:40 +0100 Subject: Add max lives limit --- server/initializers/checker-before-init.ts | 2 +- server/initializers/config.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'server/initializers') diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts index d4140e3fa..93b71a242 100644 --- a/server/initializers/checker-before-init.ts +++ b/server/initializers/checker-before-init.ts @@ -38,7 +38,7 @@ function checkMissedConfig () { 'federation.videos.federate_unlisted', 'search.remote_uri.users', 'search.remote_uri.anonymous', 'search.search_index.enabled', 'search.search_index.url', 'search.search_index.disable_local_search', 'search.search_index.is_default_search', - 'live.enabled', 'live.allow_replay', 'live.max_duration', + 'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives', 'live.transcoding.enabled', 'live.transcoding.threads', 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p', 'live.transcoding.resolutions.480p', 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p', 'live.transcoding.resolutions.2160p' diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 9e8927350..b70361aa9 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts @@ -202,6 +202,9 @@ const CONFIG = { get ENABLED () { return config.get('live.enabled') }, get MAX_DURATION () { return parseDurationToMs(config.get('live.max_duration')) }, + get MAX_INSTANCE_LIVES () { return config.get('live.max_instance_lives') }, + get MAX_USER_LIVES () { return config.get('live.max_user_lives') }, + get ALLOW_REPLAY () { return config.get('live.allow_replay') }, RTMP: { -- cgit v1.2.3