diff options
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r-- | server/initializers/checker-after-init.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts index bc4aae957..a57d552df 100644 --- a/server/initializers/checker-after-init.ts +++ b/server/initializers/checker-after-init.ts | |||
@@ -11,6 +11,7 @@ import { RecentlyAddedStrategy } from '../../shared/models/redundancy' | |||
11 | import { isArray } from '../helpers/custom-validators/misc' | 11 | import { isArray } from '../helpers/custom-validators/misc' |
12 | import { uniq } from 'lodash' | 12 | import { uniq } from 'lodash' |
13 | import { WEBSERVER } from './constants' | 13 | import { WEBSERVER } from './constants' |
14 | import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type' | ||
14 | 15 | ||
15 | async function checkActivityPubUrls () { | 16 | async function checkActivityPubUrls () { |
16 | const actor = await getServerActor() | 17 | const actor = await getServerActor() |
@@ -87,6 +88,13 @@ function checkConfig () { | |||
87 | return 'Videos redundancy should be an array (you must uncomment lines containing - too)' | 88 | return 'Videos redundancy should be an array (you must uncomment lines containing - too)' |
88 | } | 89 | } |
89 | 90 | ||
91 | // Remote redundancies | ||
92 | const acceptFrom = CONFIG.REMOTE_REDUNDANCY.VIDEOS.ACCEPT_FROM | ||
93 | const acceptFromValues = new Set<VideoRedundancyConfigFilter>([ 'nobody', 'anybody', 'followings' ]) | ||
94 | if (acceptFromValues.has(acceptFrom) === false) { | ||
95 | return 'remote_redundancy.videos.accept_from has an incorrect value' | ||
96 | } | ||
97 | |||
90 | // Check storage directory locations | 98 | // Check storage directory locations |
91 | if (isProdInstance()) { | 99 | if (isProdInstance()) { |
92 | const configStorage = config.get('storage') | 100 | const configStorage = config.get('storage') |