aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/config.ts
diff options
context:
space:
mode:
authorYohan Boniface <yb@enix.org>2019-04-26 13:48:55 +0200
committerChocobozzz <me@florianbigard.com>2019-04-26 13:48:55 +0200
commitc342726ad4ccbb90b8ff29f1cc1c89f9f7e8d98f (patch)
tree1a6d50694fc1db90bdb6d455d6988eb14eb9fd4b /server/initializers/config.ts
parent4f0f2ab228d73dbec303914dd59b52f6cdaddf46 (diff)
downloadPeerTube-c342726ad4ccbb90b8ff29f1cc1c89f9f7e8d98f.tar.gz
PeerTube-c342726ad4ccbb90b8ff29f1cc1c89f9f7e8d98f.tar.zst
PeerTube-c342726ad4ccbb90b8ff29f1cc1c89f9f7e8d98f.zip
Allow to control RATES_LIMIT from configuration (#1787)
* Allow to control RATES_LIMIT from configuration * @Chocobozzz review (squash me)
Diffstat (limited to 'server/initializers/config.ts')
-rw-r--r--server/initializers/config.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index baf502305..4f77e144d 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -63,6 +63,16 @@ const CONFIG = {
63 HOSTNAME: config.get<string>('webserver.hostname'), 63 HOSTNAME: config.get<string>('webserver.hostname'),
64 PORT: config.get<number>('webserver.port') 64 PORT: config.get<number>('webserver.port')
65 }, 65 },
66 RATES_LIMIT: {
67 LOGIN: {
68 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.login.window')),
69 MAX: config.get<number>('rates_limit.login.max')
70 },
71 ASK_SEND_EMAIL: {
72 WINDOW_MS: parseDurationToMs(config.get<string>('rates_limit.ask_send_email.window')),
73 MAX: config.get<number>('rates_limit.ask_send_email.max')
74 }
75 },
66 TRUST_PROXY: config.get<string[]>('trust_proxy'), 76 TRUST_PROXY: config.get<string[]>('trust_proxy'),
67 LOG: { 77 LOG: {
68 LEVEL: config.get<string>('log.level') 78 LEVEL: config.get<string>('log.level')