1
0
mirror of https://github.com/bitwarden/server synced 2026-01-05 01:53:17 +00:00

rate limiting APIs

This commit is contained in:
Kyle Spearrin
2016-11-12 18:43:32 -05:00
parent ac62d54a7b
commit 17f8d0f677
4 changed files with 112 additions and 1 deletions

View File

@@ -24,5 +24,60 @@
"gcmApiKey": "SECRET",
"gcmAppPackageName": "com.x8bit.bitwarden"
}
},
"IpRateLimitOptions": {
"EnableEndpointRateLimiting": true,
"StackBlockedRequests": false,
"RealIpHeader": "X-Forwarded-For",
"ClientIdHeader": "X-ClientId",
"HttpStatusCode": 429,
"IpWhitelist": [],
"EndpointWhitelist": [],
"ClientWhitelist": [],
"GeneralRules": [
{
"Endpoint": "post:/auth/token",
"Period": "1m",
"Limit": 10
},
{
"Endpoint": "post:/auth/token/two-factor",
"Period": "1m",
"Limit": 5
},
{
"Endpoint": "post:/accounts/register",
"Period": "1m",
"Limit": 2
},
{
"Endpoint": "post:/account/password-hint",
"Period": "1m",
"Limit": 2
},
{
"Endpoint": "post:/account/email-token",
"Period": "1m",
"Limit": 2
},
{
"Endpoint": "post:/account/email",
"Period": "1m",
"Limit": 5
},
{
"Endpoint": "put:/account/email",
"Period": "1m",
"Limit": 5
},
{
"Endpoint": "get:/alive",
"Period": "1m",
"Limit": 5
}
]
},
"IpRateLimitPolicies": {
"IpRules": []
}
}