Skip to content

Commit

Permalink
fix(api): Implement rate limiting for refresh token endpoint
Browse files Browse the repository at this point in the history
- Added rate limiting middleware to enforce usage limits based on IP address.
- Allowed up to 150 requests every 5 minutes per IP address.
  • Loading branch information
TKanX committed Oct 14, 2024
1 parent 8ffc839 commit f7fe841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/authRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ router.post(
rateLimiter(15, 60 * 60 * 1000),
authController.loginUser
);
router.post("/refresh-token", authController.refreshToken);
router.post("/refresh-token", rateLimiter(), authController.refreshToken);

router.post(
"/reset-password",
Expand Down

0 comments on commit f7fe841

Please sign in to comment.