Improve rate limits

main
René Jochum 2 years ago
parent d9aedfc5c2
commit f6178c1c4c
Signed by: jochum
GPG Key ID: F7D906F5E51E8E5E

@ -324,8 +324,7 @@ func main() {
router.Endpoint(authpb.AuthService.List),
router.Params("limit", "offset"),
router.AuthRequired(),
router.RatelimitClientIP("1-M"),
router.RatelimitUser("1-M"),
router.RatelimitUser("1-S", "10-M"),
),
router.NewRoute(
router.Method(router.MethodPost),
@ -344,7 +343,6 @@ func main() {
router.Path("/refresh"),
router.Endpoint(authpb.AuthService.Refresh),
router.RatelimitClientIP("1-M", "10-H", "50-D"),
router.RatelimitUser("1-M", "10-H", "50-D"),
),
router.NewRoute(
router.Method(router.MethodDelete),
@ -352,7 +350,6 @@ func main() {
router.Endpoint(authpb.AuthService.Delete),
router.Params("userId"),
router.AuthRequired(),
router.RatelimitClientIP("1-S", "10-M"),
router.RatelimitUser("1-S", "10-M"),
),
router.NewRoute(
@ -361,7 +358,6 @@ func main() {
router.Endpoint(authpb.AuthService.Detail),
router.Params("userId"),
router.AuthRequired(),
router.RatelimitClientIP("100-M"),
router.RatelimitUser("100-M"),
),
router.NewRoute(
@ -370,7 +366,6 @@ func main() {
router.Endpoint(authpb.AuthService.UpdateRoles),
router.Params("userId"),
router.AuthRequired(),
router.RatelimitClientIP("1-M"),
router.RatelimitUser("1-M"),
),
)

Loading…
Cancel
Save