mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-27 09:32:20 -05:00
chore: enable option on ratelimit docs
Update rate-limit.mdx
This commit is contained in:
@@ -21,6 +21,17 @@ export const auth = betterAuth({
|
||||
})
|
||||
```
|
||||
|
||||
Rate limiting is disabled in development mode by default. In order to enable it, set `enabled` to `true`:
|
||||
|
||||
```ts title="auth.ts"
|
||||
export const auth = betterAuth({
|
||||
rateLimit: {
|
||||
enabled: true,
|
||||
//...other options
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
In addition to the default settings, Better Auth provides custom rules for specific paths. For example:
|
||||
- `/sign-in/email`: Is limited to 3 requests within 10 seconds.
|
||||
|
||||
@@ -202,4 +213,4 @@ Table Name: `rateLimit`
|
||||
type: "bigint",
|
||||
description: "Max requests in the window"
|
||||
}]}
|
||||
/>
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user