aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker-after-init.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r--server/initializers/checker-after-init.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 955d55206..db3115085 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -4,19 +4,20 @@ import { UserModel } from '../models/account/user'
4import { ApplicationModel } from '../models/application/application' 4import { ApplicationModel } from '../models/application/application'
5import { OAuthClientModel } from '../models/oauth/oauth-client' 5import { OAuthClientModel } from '../models/oauth/oauth-client'
6import { parse } from 'url' 6import { parse } from 'url'
7import { CONFIG } from './constants' 7import { CONFIG } from './config'
8import { logger } from '../helpers/logger' 8import { logger } from '../helpers/logger'
9import { getServerActor } from '../helpers/utils' 9import { getServerActor } from '../helpers/utils'
10import { RecentlyAddedStrategy } from '../../shared/models/redundancy' 10import { RecentlyAddedStrategy } from '../../shared/models/redundancy'
11import { isArray } from '../helpers/custom-validators/misc' 11import { isArray } from '../helpers/custom-validators/misc'
12import { uniq } from 'lodash' 12import { uniq } from 'lodash'
13import { Emailer } from '../lib/emailer' 13import { Emailer } from '../lib/emailer'
14import { WEBSERVER } from './constants'
14 15
15async function checkActivityPubUrls () { 16async function checkActivityPubUrls () {
16 const actor = await getServerActor() 17 const actor = await getServerActor()
17 18
18 const parsed = parse(actor.url) 19 const parsed = parse(actor.url)
19 if (CONFIG.WEBSERVER.HOST !== parsed.host) { 20 if (WEBSERVER.HOST !== parsed.host) {
20 const NODE_ENV = config.util.getEnv('NODE_ENV') 21 const NODE_ENV = config.util.getEnv('NODE_ENV')
21 const NODE_CONFIG_DIR = config.util.getEnv('NODE_CONFIG_DIR') 22 const NODE_CONFIG_DIR = config.util.getEnv('NODE_CONFIG_DIR')
22 23
@@ -34,6 +35,12 @@ async function checkActivityPubUrls () {
34// Return an error message, or null if everything is okay 35// Return an error message, or null if everything is okay
35function checkConfig () { 36function checkConfig () {
36 37
38 // Moved configuration keys
39 if (config.has('services.csp-logger')) {
40 logger.warn('services.csp-logger configuration has been renamed to csp.report_uri. Please update your configuration file.')
41 }
42
43 // Email verification
37 if (!Emailer.isEnabled()) { 44 if (!Emailer.isEnabled()) {
38 if (CONFIG.SIGNUP.ENABLED && CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION) { 45 if (CONFIG.SIGNUP.ENABLED && CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION) {
39 return 'Emailer is disabled but you require signup email verification.' 46 return 'Emailer is disabled but you require signup email verification.'
@@ -77,6 +84,8 @@ function checkConfig () {
77 if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) { 84 if (recentlyAddedStrategy && isNaN(recentlyAddedStrategy.minViews)) {
78 return 'Min views in recently added strategy is not a number' 85 return 'Min views in recently added strategy is not a number'
79 } 86 }
87 } else {
88 return 'Videos redundancy should be an array (you must uncomment lines containing - too)'
80 } 89 }
81 90
82 // Check storage directory locations 91 // Check storage directory locations