aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker-before-init.ts2
-rw-r--r--server/initializers/config.ts3
-rw-r--r--server/initializers/constants.ts11
3 files changed, 14 insertions, 2 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index c211d725c..1f5ec20df 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -12,7 +12,7 @@ function checkMissedConfig () {
12 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address', 12 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address',
13 'email.body.signature', 'email.object.prefix', 13 'email.body.signature', 'email.object.prefix',
14 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache', 14 'storage.avatars', 'storage.videos', 'storage.logs', 'storage.previews', 'storage.thumbnails', 'storage.torrents', 'storage.cache',
15 'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 15 'storage.redundancy', 'storage.tmp', 'storage.streaming_playlists', 'storage.plugins',
16 'log.level', 16 'log.level',
17 'user.video_quota', 'user.video_quota_daily', 17 'user.video_quota', 'user.video_quota_daily',
18 'csp.enabled', 'csp.report_only', 'csp.report_uri', 18 'csp.enabled', 'csp.report_only', 'csp.report_uri',
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index eefb45fb9..6737edcd6 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -63,7 +63,8 @@ const CONFIG = {
63 PREVIEWS_DIR: buildPath(config.get<string>('storage.previews')), 63 PREVIEWS_DIR: buildPath(config.get<string>('storage.previews')),
64 CAPTIONS_DIR: buildPath(config.get<string>('storage.captions')), 64 CAPTIONS_DIR: buildPath(config.get<string>('storage.captions')),
65 TORRENTS_DIR: buildPath(config.get<string>('storage.torrents')), 65 TORRENTS_DIR: buildPath(config.get<string>('storage.torrents')),
66 CACHE_DIR: buildPath(config.get<string>('storage.cache')) 66 CACHE_DIR: buildPath(config.get<string>('storage.cache')),
67 PLUGINS_DIR: buildPath(config.get<string>('storage.plugins'))
67 }, 68 },
68 WEBSERVER: { 69 WEBSERVER: {
69 SCHEME: config.get<boolean>('webserver.https') === true ? 'https' : 'http', 70 SCHEME: config.get<boolean>('webserver.https') === true ? 'https' : 'http',
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index abd9c2003..8ceefbd0e 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -277,6 +277,10 @@ let CONSTRAINTS_FIELDS = {
277 CONTACT_FORM: { 277 CONTACT_FORM: {
278 FROM_NAME: { min: 1, max: 120 }, // Length 278 FROM_NAME: { min: 1, max: 120 }, // Length
279 BODY: { min: 3, max: 5000 } // Length 279 BODY: { min: 3, max: 5000 } // Length
280 },
281 PLUGINS: {
282 NAME: { min: 1, max: 214 }, // Length
283 DESCRIPTION: { min: 1, max: 20000 } // Length
280 } 284 }
281} 285}
282 286
@@ -578,6 +582,11 @@ const P2P_MEDIA_LOADER_PEER_VERSION = 2
578 582
579// --------------------------------------------------------------------------- 583// ---------------------------------------------------------------------------
580 584
585const PLUGIN_GLOBAL_CSS_FILE_NAME = 'plugins-global.css'
586const PLUGIN_GLOBAL_CSS_PATH = join(CONFIG.STORAGE.TMP_DIR, PLUGIN_GLOBAL_CSS_FILE_NAME)
587
588// ---------------------------------------------------------------------------
589
581// Special constants for a test instance 590// Special constants for a test instance
582if (isTestInstance() === true) { 591if (isTestInstance() === true) {
583 PRIVATE_RSA_KEY_SIZE = 1024 592 PRIVATE_RSA_KEY_SIZE = 1024
@@ -650,6 +659,8 @@ export {
650 REMOTE_SCHEME, 659 REMOTE_SCHEME,
651 FOLLOW_STATES, 660 FOLLOW_STATES,
652 SERVER_ACTOR_NAME, 661 SERVER_ACTOR_NAME,
662 PLUGIN_GLOBAL_CSS_FILE_NAME,
663 PLUGIN_GLOBAL_CSS_PATH,
653 PRIVATE_RSA_KEY_SIZE, 664 PRIVATE_RSA_KEY_SIZE,
654 ROUTE_CACHE_LIFETIME, 665 ROUTE_CACHE_LIFETIME,
655 SORTABLE_COLUMNS, 666 SORTABLE_COLUMNS,