aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.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/constants.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/constants.ts')
-rw-r--r--server/initializers/constants.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 2be364cc8..193bae5b5 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -281,12 +281,12 @@ let CONSTRAINTS_FIELDS = {
281 281
282const RATES_LIMIT = { 282const RATES_LIMIT = {
283 LOGIN: { 283 LOGIN: {
284 WINDOW_MS: 5 * 60 * 1000, // 5 minutes 284 WINDOW_MS: CONFIG.RATES_LIMIT.LOGIN.WINDOW_MS,
285 MAX: 15 // 15 attempts 285 MAX: CONFIG.RATES_LIMIT.LOGIN.MAX
286 }, 286 },
287 ASK_SEND_EMAIL: { 287 ASK_SEND_EMAIL: {
288 WINDOW_MS: 5 * 60 * 1000, // 5 minutes 288 WINDOW_MS: CONFIG.RATES_LIMIT.ASK_SEND_EMAIL.WINDOW_MS,
289 MAX: 3 // 3 attempts 289 MAX: CONFIG.RATES_LIMIT.ASK_SEND_EMAIL.MAX
290 } 290 }
291} 291}
292 292