]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - server/initializers/config.ts
Merge branch 'release/4.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / initializers / config.ts
1 import bytes from 'bytes'
2 import { IConfig } from 'config'
3 import { dirname, join } from 'path'
4 import { decacheModule } from '@server/helpers/decache'
5 import { VideoRedundancyConfigFilter } from '@shared/models/redundancy/video-redundancy-config-filter.type'
6 import { BroadcastMessageLevel } from '@shared/models/server'
7 import { VideoPrivacy, VideosRedundancyStrategy } from '../../shared/models'
8 import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
9 import { buildPath, root } from '../../shared/core-utils'
10 import { parseBytes, parseDurationToMs } from '../helpers/core-utils'
11
12 // Use a variable to reload the configuration if we need
13 let config: IConfig = require('config')
14
15 const configChangedHandlers: Function[] = []
16
17 const CONFIG = {
18 CUSTOM_FILE: getLocalConfigFilePath(),
19 LISTEN: {
20 PORT: config.get<number>('listen.port'),
21 HOSTNAME: config.get<string>('listen.hostname')
22 },
23 DATABASE: {
24 DBNAME: config.has('database.name') ? config.get<string>('database.name') : 'peertube' + config.get<string>('database.suffix'),
25 HOSTNAME: config.get<string>('database.hostname'),
26 PORT: config.get<number>('database.port'),
27 SSL: config.get<boolean>('database.ssl'),
28 USERNAME: config.get<string>('database.username'),
29 PASSWORD: config.get<string>('database.password'),
30 POOL: {
31 MAX: config.get<number>('database.pool.max')
32 }
33 },
34 REDIS: {
35 HOSTNAME: config.has('redis.hostname') ? config.get<string>('redis.hostname') : null,
36 PORT: config.has('redis.port') ? config.get<number>('redis.port') : null,
37 SOCKET: config.has('redis.socket') ? config.get<string>('redis.socket') : null,
38 AUTH: config.has('redis.auth') ? config.get<string>('redis.auth') : null,
39 DB: config.has('redis.db') ? config.get<number>('redis.db') : null
40 },
41 SMTP: {
42 TRANSPORT: config.has('smtp.transport') ? config.get<string>('smtp.transport') : 'smtp',
43 SENDMAIL: config.has('smtp.sendmail') ? config.get<string>('smtp.sendmail') : null,
44 HOSTNAME: config.get<string>('smtp.hostname'),
45 PORT: config.get<number>('smtp.port'),
46 USERNAME: config.get<string>('smtp.username'),
47 PASSWORD: config.get<string>('smtp.password'),
48 TLS: config.get<boolean>('smtp.tls'),
49 DISABLE_STARTTLS: config.get<boolean>('smtp.disable_starttls'),
50 CA_FILE: config.get<string>('smtp.ca_file'),
51 FROM_ADDRESS: config.get<string>('smtp.from_address')
52 },
53 EMAIL: {
54 BODY: {
55 SIGNATURE: config.get<string>('email.body.signature')
56 },
57 SUBJECT: {
58 PREFIX: config.get<string>('email.subject.prefix') + ' '
59 }
60 },
61
62 CLIENT: {
63 VIDEOS: {
64 MINIATURE: {
65 get PREFER_AUTHOR_DISPLAY_NAME () { return config.get<boolean>('client.videos.miniature.prefer_author_display_name') }
66 }
67 },
68 MENU: {
69 LOGIN: {
70 get REDIRECT_ON_SINGLE_EXTERNAL_AUTH () { return config.get<boolean>('client.menu.login.redirect_on_single_external_auth') }
71 }
72 }
73 },
74
75 DEFAULTS: {
76 PUBLISH: {
77 DOWNLOAD_ENABLED: config.get<boolean>('defaults.publish.download_enabled'),
78 COMMENTS_ENABLED: config.get<boolean>('defaults.publish.comments_enabled'),
79 PRIVACY: config.get<VideoPrivacy>('defaults.publish.privacy'),
80 LICENCE: config.get<number>('defaults.publish.licence')
81 },
82 P2P: {
83 WEBAPP: {
84 ENABLED: config.get<boolean>('defaults.p2p.webapp.enabled')
85 },
86 EMBED: {
87 ENABLED: config.get<boolean>('defaults.p2p.embed.enabled')
88 }
89 }
90 },
91
92 STORAGE: {
93 TMP_DIR: buildPath(config.get<string>('storage.tmp')),
94 BIN_DIR: buildPath(config.get<string>('storage.bin')),
95 ACTOR_IMAGES: buildPath(config.get<string>('storage.avatars')),
96 LOG_DIR: buildPath(config.get<string>('storage.logs')),
97 VIDEOS_DIR: buildPath(config.get<string>('storage.videos')),
98 STREAMING_PLAYLISTS_DIR: buildPath(config.get<string>('storage.streaming_playlists')),
99 REDUNDANCY_DIR: buildPath(config.get<string>('storage.redundancy')),
100 THUMBNAILS_DIR: buildPath(config.get<string>('storage.thumbnails')),
101 PREVIEWS_DIR: buildPath(config.get<string>('storage.previews')),
102 CAPTIONS_DIR: buildPath(config.get<string>('storage.captions')),
103 TORRENTS_DIR: buildPath(config.get<string>('storage.torrents')),
104 CACHE_DIR: buildPath(config.get<string>('storage.cache')),
105 PLUGINS_DIR: buildPath(config.get<string>('storage.plugins')),
106 CLIENT_OVERRIDES_DIR: buildPath(config.get<string>('storage.client_overrides'))
107 },
108 OBJECT_STORAGE: {
109 ENABLED: config.get<boolean>('object_storage.enabled'),
110 MAX_UPLOAD_PART: bytes.parse(config.get<string>('object_storage.max_upload_part')),
111 ENDPOINT: config.get<string>('object_storage.endpoint'),
112 REGION: config.get<string>('object_storage.region'),
113 CREDENTIALS: {
114 ACCESS_KEY_ID: config.get<string>('object_storage.credentials.access_key_id'),
115 SECRET_ACCESS_KEY: config.get<string>('object_storage.credentials.secret_access_key')
116 },
117 VIDEOS: {
118 BUCKET_NAME: config.get<string>('object_storage.videos.bucket_name'),
119 PREFIX: config.get<string>('object_storage.videos.prefix'),
120 BASE_URL: config.get<string>('object_storage.videos.base_url')
121 },
122 STREAMING_PLAYLISTS: {
123 BUCKET_NAME: config.get<string>('object_storage.streaming_playlists.bucket_name'),
124 PREFIX: config.get<string>('object_storage.streaming_playlists.prefix'),
125 BASE_URL: config.get<string>('object_storage.streaming_playlists.base_url')
126 }
127 },
128 WEBSERVER: {
129 SCHEME: config.get<boolean>('webserver.https') === true ? 'https' : 'http',
130 WS: config.get<boolean>('webserver.https') === true ? 'wss' : 'ws',
131 HOSTNAME: config.get<string>('webserver.hostname'),
132 PORT: config.get<number>('webserver.port')
133 },
134 RATES_LIMIT: {
135 API: {
136 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.api.window')),
137 MAX: config.get<number>('rates_limit.api.max')
138 },
139 SIGNUP: {
140 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.signup.window')),
141 MAX: config.get<number>('rates_limit.signup.max')
142 },
143 LOGIN: {
144 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.login.window')),
145 MAX: config.get<number>('rates_limit.login.max')
146 },
147 ASK_SEND_EMAIL: {
148 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.ask_send_email.window')),
149 MAX: config.get<number>('rates_limit.ask_send_email.max')
150 }
151 },
152 TRUST_PROXY: config.get<string[]>('trust_proxy'),
153 LOG: {
154 LEVEL: config.get<string>('log.level'),
155 ROTATION: {
156 ENABLED: config.get<boolean>('log.rotation.enabled'),
157 MAX_FILE_SIZE: bytes.parse(config.get<string>('log.rotation.max_file_size')),
158 MAX_FILES: config.get<number>('log.rotation.max_files')
159 },
160 ANONYMIZE_IP: config.get<boolean>('log.anonymize_ip'),
161 LOG_PING_REQUESTS: config.get<boolean>('log.log_ping_requests'),
162 PRETTIFY_SQL: config.get<boolean>('log.prettify_sql')
163 },
164 TRENDING: {
165 VIDEOS: {
166 INTERVAL_DAYS: config.get<number>('trending.videos.interval_days'),
167 ALGORITHMS: {
168 get ENABLED () { return config.get<string[]>('trending.videos.algorithms.enabled') },
169 get DEFAULT () { return config.get<string>('trending.videos.algorithms.default') }
170 }
171 }
172 },
173 REDUNDANCY: {
174 VIDEOS: {
175 CHECK_INTERVAL: parseDurationToMs(config.get<string>('redundancy.videos.check_interval')),
176 STRATEGIES: buildVideosRedundancy(config.get<any[]>('redundancy.videos.strategies'))
177 }
178 },
179 REMOTE_REDUNDANCY: {
180 VIDEOS: {
181 ACCEPT_FROM: config.get<VideoRedundancyConfigFilter>('remote_redundancy.videos.accept_from')
182 }
183 },
184 CSP: {
185 ENABLED: config.get<boolean>('csp.enabled'),
186 REPORT_ONLY: config.get<boolean>('csp.report_only'),
187 REPORT_URI: config.get<string>('csp.report_uri')
188 },
189 SECURITY: {
190 FRAMEGUARD: {
191 ENABLED: config.get<boolean>('security.frameguard.enabled')
192 }
193 },
194 TRACKER: {
195 ENABLED: config.get<boolean>('tracker.enabled'),
196 PRIVATE: config.get<boolean>('tracker.private'),
197 REJECT_TOO_MANY_ANNOUNCES: config.get<boolean>('tracker.reject_too_many_announces')
198 },
199 HISTORY: {
200 VIDEOS: {
201 MAX_AGE: parseDurationToMs(config.get('history.videos.max_age'))
202 }
203 },
204 VIEWS: {
205 VIDEOS: {
206 REMOTE: {
207 MAX_AGE: parseDurationToMs(config.get('views.videos.remote.max_age'))
208 },
209 LOCAL_BUFFER_UPDATE_INTERVAL: parseDurationToMs(config.get('views.videos.local_buffer_update_interval')),
210 IP_VIEW_EXPIRATION: parseDurationToMs(config.get('views.videos.ip_view_expiration'))
211 }
212 },
213 PLUGINS: {
214 INDEX: {
215 ENABLED: config.get<boolean>('plugins.index.enabled'),
216 CHECK_LATEST_VERSIONS_INTERVAL: parseDurationToMs(config.get<string>('plugins.index.check_latest_versions_interval')),
217 URL: config.get<string>('plugins.index.url')
218 }
219 },
220 FEDERATION: {
221 VIDEOS: {
222 FEDERATE_UNLISTED: config.get<boolean>('federation.videos.federate_unlisted'),
223 CLEANUP_REMOTE_INTERACTIONS: config.get<boolean>('federation.videos.cleanup_remote_interactions')
224 }
225 },
226 PEERTUBE: {
227 CHECK_LATEST_VERSION: {
228 ENABLED: config.get<boolean>('peertube.check_latest_version.enabled'),
229 URL: config.get<string>('peertube.check_latest_version.url')
230 }
231 },
232 WEBADMIN: {
233 CONFIGURATION: {
234 EDITION: {
235 ALLOWED: config.get<boolean>('webadmin.configuration.edition.allowed')
236 }
237 }
238 },
239 ADMIN: {
240 get EMAIL () { return config.get<string>('admin.email') }
241 },
242 CONTACT_FORM: {
243 get ENABLED () { return config.get<boolean>('contact_form.enabled') }
244 },
245 SIGNUP: {
246 get ENABLED () { return config.get<boolean>('signup.enabled') },
247 get LIMIT () { return config.get<number>('signup.limit') },
248 get REQUIRES_EMAIL_VERIFICATION () { return config.get<boolean>('signup.requires_email_verification') },
249 get MINIMUM_AGE () { return config.get<number>('signup.minimum_age') },
250 FILTERS: {
251 CIDR: {
252 get WHITELIST () { return config.get<string[]>('signup.filters.cidr.whitelist') },
253 get BLACKLIST () { return config.get<string[]>('signup.filters.cidr.blacklist') }
254 }
255 }
256 },
257 USER: {
258 get VIDEO_QUOTA () { return parseBytes(config.get<number>('user.video_quota')) },
259 get VIDEO_QUOTA_DAILY () { return parseBytes(config.get<number>('user.video_quota_daily')) }
260 },
261 VIDEO_CHANNELS: {
262 get MAX_PER_USER () { return config.get<number>('video_channels.max_per_user') }
263 },
264 TRANSCODING: {
265 get ENABLED () { return config.get<boolean>('transcoding.enabled') },
266 get ALLOW_ADDITIONAL_EXTENSIONS () { return config.get<boolean>('transcoding.allow_additional_extensions') },
267 get ALLOW_AUDIO_FILES () { return config.get<boolean>('transcoding.allow_audio_files') },
268 get THREADS () { return config.get<number>('transcoding.threads') },
269 get CONCURRENCY () { return config.get<number>('transcoding.concurrency') },
270 get PROFILE () { return config.get<string>('transcoding.profile') },
271 RESOLUTIONS: {
272 get '0p' () { return config.get<boolean>('transcoding.resolutions.0p') },
273 get '144p' () { return config.get<boolean>('transcoding.resolutions.144p') },
274 get '240p' () { return config.get<boolean>('transcoding.resolutions.240p') },
275 get '360p' () { return config.get<boolean>('transcoding.resolutions.360p') },
276 get '480p' () { return config.get<boolean>('transcoding.resolutions.480p') },
277 get '720p' () { return config.get<boolean>('transcoding.resolutions.720p') },
278 get '1080p' () { return config.get<boolean>('transcoding.resolutions.1080p') },
279 get '1440p' () { return config.get<boolean>('transcoding.resolutions.1440p') },
280 get '2160p' () { return config.get<boolean>('transcoding.resolutions.2160p') }
281 },
282 HLS: {
283 get ENABLED () { return config.get<boolean>('transcoding.hls.enabled') }
284 },
285 WEBTORRENT: {
286 get ENABLED () { return config.get<boolean>('transcoding.webtorrent.enabled') }
287 }
288 },
289 LIVE: {
290 get ENABLED () { return config.get<boolean>('live.enabled') },
291
292 get MAX_DURATION () { return parseDurationToMs(config.get<string>('live.max_duration')) },
293 get MAX_INSTANCE_LIVES () { return config.get<number>('live.max_instance_lives') },
294 get MAX_USER_LIVES () { return config.get<number>('live.max_user_lives') },
295
296 get ALLOW_REPLAY () { return config.get<boolean>('live.allow_replay') },
297
298 RTMP: {
299 get ENABLED () { return config.get<boolean>('live.rtmp.enabled') },
300 get PORT () { return config.get<number>('live.rtmp.port') },
301 get HOSTNAME () { return config.get<number>('live.rtmp.hostname') }
302 },
303
304 RTMPS: {
305 get ENABLED () { return config.get<boolean>('live.rtmps.enabled') },
306 get PORT () { return config.get<number>('live.rtmps.port') },
307 get HOSTNAME () { return config.get<number>('live.rtmps.hostname') },
308 get KEY_FILE () { return config.get<string>('live.rtmps.key_file') },
309 get CERT_FILE () { return config.get<string>('live.rtmps.cert_file') }
310 },
311
312 TRANSCODING: {
313 get ENABLED () { return config.get<boolean>('live.transcoding.enabled') },
314 get THREADS () { return config.get<number>('live.transcoding.threads') },
315 get PROFILE () { return config.get<string>('live.transcoding.profile') },
316
317 RESOLUTIONS: {
318 get '144p' () { return config.get<boolean>('live.transcoding.resolutions.144p') },
319 get '240p' () { return config.get<boolean>('live.transcoding.resolutions.240p') },
320 get '360p' () { return config.get<boolean>('live.transcoding.resolutions.360p') },
321 get '480p' () { return config.get<boolean>('live.transcoding.resolutions.480p') },
322 get '720p' () { return config.get<boolean>('live.transcoding.resolutions.720p') },
323 get '1080p' () { return config.get<boolean>('live.transcoding.resolutions.1080p') },
324 get '1440p' () { return config.get<boolean>('live.transcoding.resolutions.1440p') },
325 get '2160p' () { return config.get<boolean>('live.transcoding.resolutions.2160p') }
326 }
327 }
328 },
329 VIDEO_EDITOR: {
330 get ENABLED () { return config.get<boolean>('video_editor.enabled') }
331 },
332 IMPORT: {
333 VIDEOS: {
334 get CONCURRENCY () { return config.get<number>('import.videos.concurrency') },
335
336 HTTP: {
337 get ENABLED () { return config.get<boolean>('import.videos.http.enabled') },
338
339 YOUTUBE_DL_RELEASE: {
340 get URL () { return config.get<string>('import.videos.http.youtube_dl_release.url') },
341 get NAME () { return config.get<string>('import.videos.http.youtube_dl_release.name') },
342 get PYTHON_PATH () { return config.get<string>('import.videos.http.youtube_dl_release.python_path') }
343 },
344
345 get FORCE_IPV4 () { return config.get<boolean>('import.videos.http.force_ipv4') }
346 },
347 TORRENT: {
348 get ENABLED () { return config.get<boolean>('import.videos.torrent.enabled') }
349 }
350 }
351 },
352 AUTO_BLACKLIST: {
353 VIDEOS: {
354 OF_USERS: {
355 get ENABLED () { return config.get<boolean>('auto_blacklist.videos.of_users.enabled') }
356 }
357 }
358 },
359 CACHE: {
360 PREVIEWS: {
361 get SIZE () { return config.get<number>('cache.previews.size') }
362 },
363 VIDEO_CAPTIONS: {
364 get SIZE () { return config.get<number>('cache.captions.size') }
365 },
366 TORRENTS: {
367 get SIZE () { return config.get<number>('cache.torrents.size') }
368 }
369 },
370 INSTANCE: {
371 get NAME () { return config.get<string>('instance.name') },
372 get SHORT_DESCRIPTION () { return config.get<string>('instance.short_description') },
373 get DESCRIPTION () { return config.get<string>('instance.description') },
374 get TERMS () { return config.get<string>('instance.terms') },
375 get CODE_OF_CONDUCT () { return config.get<string>('instance.code_of_conduct') },
376
377 get CREATION_REASON () { return config.get<string>('instance.creation_reason') },
378
379 get MODERATION_INFORMATION () { return config.get<string>('instance.moderation_information') },
380 get ADMINISTRATOR () { return config.get<string>('instance.administrator') },
381 get MAINTENANCE_LIFETIME () { return config.get<string>('instance.maintenance_lifetime') },
382 get BUSINESS_MODEL () { return config.get<string>('instance.business_model') },
383 get HARDWARE_INFORMATION () { return config.get<string>('instance.hardware_information') },
384
385 get LANGUAGES () { return config.get<string[]>('instance.languages') || [] },
386 get CATEGORIES () { return config.get<number[]>('instance.categories') || [] },
387
388 get IS_NSFW () { return config.get<boolean>('instance.is_nsfw') },
389 get DEFAULT_NSFW_POLICY () { return config.get<NSFWPolicyType>('instance.default_nsfw_policy') },
390
391 get DEFAULT_CLIENT_ROUTE () { return config.get<string>('instance.default_client_route') },
392
393 CUSTOMIZATIONS: {
394 get JAVASCRIPT () { return config.get<string>('instance.customizations.javascript') },
395 get CSS () { return config.get<string>('instance.customizations.css') }
396 },
397 get ROBOTS () { return config.get<string>('instance.robots') },
398 get SECURITYTXT () { return config.get<string>('instance.securitytxt') },
399 get SECURITYTXT_CONTACT () { return config.get<string>('admin.email') }
400 },
401 SERVICES: {
402 TWITTER: {
403 get USERNAME () { return config.get<string>('services.twitter.username') },
404 get WHITELISTED () { return config.get<boolean>('services.twitter.whitelisted') }
405 }
406 },
407 FOLLOWERS: {
408 INSTANCE: {
409 get ENABLED () { return config.get<boolean>('followers.instance.enabled') },
410 get MANUAL_APPROVAL () { return config.get<boolean>('followers.instance.manual_approval') }
411 }
412 },
413 FOLLOWINGS: {
414 INSTANCE: {
415 AUTO_FOLLOW_BACK: {
416 get ENABLED () {
417 return config.get<boolean>('followings.instance.auto_follow_back.enabled')
418 }
419 },
420 AUTO_FOLLOW_INDEX: {
421 get ENABLED () {
422 return config.get<boolean>('followings.instance.auto_follow_index.enabled')
423 },
424 get INDEX_URL () {
425 return config.get<string>('followings.instance.auto_follow_index.index_url')
426 }
427 }
428 }
429 },
430 THEME: {
431 get DEFAULT () { return config.get<string>('theme.default') }
432 },
433 BROADCAST_MESSAGE: {
434 get ENABLED () { return config.get<boolean>('broadcast_message.enabled') },
435 get MESSAGE () { return config.get<string>('broadcast_message.message') },
436 get LEVEL () { return config.get<BroadcastMessageLevel>('broadcast_message.level') },
437 get DISMISSABLE () { return config.get<boolean>('broadcast_message.dismissable') }
438 },
439 SEARCH: {
440 REMOTE_URI: {
441 get USERS () { return config.get<boolean>('search.remote_uri.users') },
442 get ANONYMOUS () { return config.get<boolean>('search.remote_uri.anonymous') }
443 },
444 SEARCH_INDEX: {
445 get ENABLED () { return config.get<boolean>('search.search_index.enabled') },
446 get URL () { return config.get<string>('search.search_index.url') },
447 get DISABLE_LOCAL_SEARCH () { return config.get<boolean>('search.search_index.disable_local_search') },
448 get IS_DEFAULT_SEARCH () { return config.get<boolean>('search.search_index.is_default_search') }
449 }
450 }
451 }
452
453 function registerConfigChangedHandler (fun: Function) {
454 configChangedHandlers.push(fun)
455 }
456
457 function isEmailEnabled () {
458 if (CONFIG.SMTP.TRANSPORT === 'sendmail' && CONFIG.SMTP.SENDMAIL) return true
459
460 if (CONFIG.SMTP.TRANSPORT === 'smtp' && CONFIG.SMTP.HOSTNAME && CONFIG.SMTP.PORT) return true
461
462 return false
463 }
464
465 // ---------------------------------------------------------------------------
466
467 export {
468 CONFIG,
469 registerConfigChangedHandler,
470 isEmailEnabled
471 }
472
473 // ---------------------------------------------------------------------------
474
475 function getLocalConfigFilePath () {
476 const localConfigDir = getLocalConfigDir()
477
478 let filename = 'local'
479 if (process.env.NODE_ENV) filename += `-${process.env.NODE_ENV}`
480 if (process.env.NODE_APP_INSTANCE) filename += `-${process.env.NODE_APP_INSTANCE}`
481
482 return join(localConfigDir, filename + '.json')
483 }
484
485 function getLocalConfigDir () {
486 if (process.env.PEERTUBE_LOCAL_CONFIG) return process.env.PEERTUBE_LOCAL_CONFIG
487
488 const configSources = config.util.getConfigSources()
489 if (configSources.length === 0) throw new Error('Invalid config source.')
490
491 return dirname(configSources[0].name)
492 }
493
494 function buildVideosRedundancy (objs: any[]): VideosRedundancyStrategy[] {
495 if (!objs) return []
496
497 if (!Array.isArray(objs)) return objs
498
499 return objs.map(obj => {
500 return Object.assign({}, obj, {
501 minLifetime: parseDurationToMs(obj.min_lifetime),
502 size: bytes.parse(obj.size),
503 minViews: obj.min_views
504 })
505 })
506 }
507
508 export function reloadConfig () {
509
510 function getConfigDirectories () {
511 if (process.env.NODE_CONFIG_DIR) {
512 return process.env.NODE_CONFIG_DIR.split(':')
513 }
514
515 return [ join(root(), 'config') ]
516 }
517
518 function purge () {
519 const directories = getConfigDirectories()
520
521 for (const fileName in require.cache) {
522 if (directories.some((dir) => fileName.includes(dir)) === false) {
523 continue
524 }
525
526 delete require.cache[fileName]
527 }
528
529 decacheModule('config')
530 }
531
532 purge()
533
534 config = require('config')
535
536 for (const configChangedHandler of configChangedHandlers) {
537 configChangedHandler()
538 }
539 }