We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90dadef commit 5074f15Copy full SHA for 5074f15
src/middleware/index.ts
@@ -4,9 +4,11 @@ import { checkRateLimit, setRateLimitCookie } from '../services/rateLimiter';
4
5
// Define rate limit configurations: path -> seconds
6
const RATE_LIMIT_CONFIG: { [path: string]: number } = {
7
- '/api/auth': 10, // Default existing behavior: 10 seconds for /api/auth and its sub-routes
8
- // Add other specific path configurations here, e.g.:
9
- // '/api/heavy-operation': 60,
+ '/api/auth/login': 10,
+ '/api/auth/logout': 10,
+ '/api/auth/signup': 60,
10
+ '/api/auth/reset-password': 60,
11
+ '/api/auth/update-password': 60,
12
};
13
14
const rateLimiter = defineMiddleware(async ({ cookies, url }, next) => {
0 commit comments