aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-30 13:27:07 +0100
committerChocobozzz <me@florianbigard.com>2018-01-30 13:27:07 +0100
commitecb4e35f4e6c7304cb274593c13cb47fd5078b75 (patch)
tree1e238002340bc521afde59d52f406e41298a7aac /server/initializers
parent80d1057bfcd3582af0dacf5ccd5a7a93ef95410b (diff)
downloadPeerTube-ecb4e35f4e6c7304cb274593c13cb47fd5078b75.tar.gz
PeerTube-ecb4e35f4e6c7304cb274593c13cb47fd5078b75.tar.zst
PeerTube-ecb4e35f4e6c7304cb274593c13cb47fd5078b75.zip
Add ability to reset our password
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker.ts3
-rw-r--r--server/initializers/constants.ts20
2 files changed, 19 insertions, 4 deletions
diff --git a/server/initializers/checker.ts b/server/initializers/checker.ts
index 35fab244c..d550fd23f 100644
--- a/server/initializers/checker.ts
+++ b/server/initializers/checker.ts
@@ -22,7 +22,8 @@ function checkMissedConfig () {
22 'webserver.https', 'webserver.hostname', 'webserver.port', 22 'webserver.https', 'webserver.hostname', 'webserver.port',
23 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password', 23 'database.hostname', 'database.port', 'database.suffix', 'database.username', 'database.password',
24 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews', 'storage.torrents', 'storage.cache', 'log.level', 24 'storage.videos', 'storage.logs', 'storage.thumbnails', 'storage.previews', 'storage.torrents', 'storage.cache', 'log.level',
25 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads', 'user.video_quota' 25 'cache.previews.size', 'admin.email', 'signup.enabled', 'signup.limit', 'transcoding.enabled', 'transcoding.threads',
26 'user.video_quota', 'smtp.hostname', 'smtp.port', 'smtp.username', 'smtp.password', 'smtp.tls', 'smtp.from_address'
26 ] 27 ]
27 const miss: string[] = [] 28 const miss: string[] = []
28 29
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 03828f54f..e7b1656e2 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -65,13 +65,15 @@ const JOB_ATTEMPTS: { [ id in JobType ]: number } = {
65 'activitypub-http-broadcast': 5, 65 'activitypub-http-broadcast': 5,
66 'activitypub-http-unicast': 5, 66 'activitypub-http-unicast': 5,
67 'activitypub-http-fetcher': 5, 67 'activitypub-http-fetcher': 5,
68 'video-file': 1 68 'video-file': 1,
69 'email': 5
69} 70}
70const JOB_CONCURRENCY: { [ id in JobType ]: number } = { 71const JOB_CONCURRENCY: { [ id in JobType ]: number } = {
71 'activitypub-http-broadcast': 1, 72 'activitypub-http-broadcast': 1,
72 'activitypub-http-unicast': 5, 73 'activitypub-http-unicast': 5,
73 'activitypub-http-fetcher': 1, 74 'activitypub-http-fetcher': 1,
74 'video-file': 1 75 'video-file': 1,
76 'email': 5
75} 77}
76// 2 days 78// 2 days
77const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 79const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2
@@ -95,9 +97,18 @@ const CONFIG = {
95 }, 97 },
96 REDIS: { 98 REDIS: {
97 HOSTNAME: config.get<string>('redis.hostname'), 99 HOSTNAME: config.get<string>('redis.hostname'),
98 PORT: config.get<string>('redis.port'), 100 PORT: config.get<number>('redis.port'),
99 AUTH: config.get<string>('redis.auth') 101 AUTH: config.get<string>('redis.auth')
100 }, 102 },
103 SMTP: {
104 HOSTNAME: config.get<string>('smtp.hostname'),
105 PORT: config.get<number>('smtp.port'),
106 USERNAME: config.get<string>('smtp.username'),
107 PASSWORD: config.get<string>('smtp.password'),
108 TLS: config.get<boolean>('smtp.tls'),
109 CA_FILE: config.get<string>('smtp.ca_file'),
110 FROM_ADDRESS: config.get<string>('smtp.from_address')
111 },
101 STORAGE: { 112 STORAGE: {
102 AVATARS_DIR: buildPath(config.get<string>('storage.avatars')), 113 AVATARS_DIR: buildPath(config.get<string>('storage.avatars')),
103 LOG_DIR: buildPath(config.get<string>('storage.logs')), 114 LOG_DIR: buildPath(config.get<string>('storage.logs')),
@@ -311,6 +322,8 @@ const PRIVATE_RSA_KEY_SIZE = 2048
311// Password encryption 322// Password encryption
312const BCRYPT_SALT_SIZE = 10 323const BCRYPT_SALT_SIZE = 10
313 324
325const USER_PASSWORD_RESET_LIFETIME = 60000 * 5 // 5 minutes
326
314// --------------------------------------------------------------------------- 327// ---------------------------------------------------------------------------
315 328
316// Express static paths (router) 329// Express static paths (router)
@@ -408,6 +421,7 @@ export {
408 VIDEO_LICENCES, 421 VIDEO_LICENCES,
409 VIDEO_RATE_TYPES, 422 VIDEO_RATE_TYPES,
410 VIDEO_MIMETYPE_EXT, 423 VIDEO_MIMETYPE_EXT,
424 USER_PASSWORD_RESET_LIFETIME,
411 AVATAR_MIMETYPE_EXT, 425 AVATAR_MIMETYPE_EXT,
412 SCHEDULER_INTERVAL, 426 SCHEDULER_INTERVAL,
413 JOB_COMPLETED_LIFETIME 427 JOB_COMPLETED_LIFETIME