Add rate limit to registration and API endpoints

This commit is contained in:
Chocobozzz
2019-07-04 16:42:40 +02:00
parent fd0bfc3ac4
commit c1340a6ac3
9 changed files with 112 additions and 23 deletions

View File

@@ -10,10 +10,18 @@ webserver:
port: 9000
rates_limit:
api:
# 50 attempts in 10 seconds
window: 10 seconds
max: 50
login:
# 15 attempts in 5 min
window: 5 minutes
max: 15
signup:
# 2 attempts in 5 min (only succeeded attempts are taken into account)
window: 5 minutes
max: 2
ask_send_email:
# 3 attempts in 5 min
window: 5 minutes

View File

@@ -9,10 +9,18 @@ webserver:
port: 443
rates_limit:
api:
# 50 attempts in 10 seconds
window: 10 seconds
max: 50
login:
# 15 attempts in 5 min
window: 5 minutes
max: 15
signup:
# 2 attempts in 5 min (only succeeded attempts are taken into account)
window: 5 minutes
max: 2
ask_send_email:
# 3 attempts in 5 min
window: 5 minutes

View File

@@ -5,6 +5,14 @@ listen:
webserver:
https: false
rates_limit:
signup:
window: 10 minutes
max: 50
login:
window: 5 minutes
max: 20
database:
hostname: 'localhost'
port: 5432