mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-04 16:30:33 -06:00
docs: rate limiting docs (#4652)
Co-authored-by: Matti Nannt <mail@matthiasnannt.com> Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com>
This commit is contained in:
committed by
GitHub
parent
05287c135e
commit
dcf4109c5b
@@ -14,7 +14,6 @@ module.exports = {
|
||||
typescript: {
|
||||
project: "tsconfig.json",
|
||||
},
|
||||
caseSensitive: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
37
apps/docs/app/self-hosting/rate-limiting/page.mdx
Normal file
37
apps/docs/app/self-hosting/rate-limiting/page.mdx
Normal file
@@ -0,0 +1,37 @@
|
||||
# Rate Limiting
|
||||
|
||||
To protect the platform from abuse and ensure fair usage, rate limiting is enforced by default on an IP-address basis. If a client exceeds the allowed number of requests within the specified time window, the API will return a `429 Too Many Requests` status code.
|
||||
|
||||
## Default Rate Limits
|
||||
|
||||
The following rate limits apply to various endpoints:
|
||||
|
||||
| **Endpoint** | **Rate Limit** | **Time Window** |
|
||||
| ----------------------- | -------------- | --------------- |
|
||||
| `POST /login` | 30 requests | 15 minutes |
|
||||
| `POST /signup` | 30 requests | 60 minutes |
|
||||
| `POST /verify-email` | 10 requests | 60 minutes |
|
||||
| `POST /forgot-password` | 5 requests | 60 minutes |
|
||||
| `GET /client-side-api` | 100 requests | 1 minute |
|
||||
| `POST /share` | 100 requests | 60 minutes |
|
||||
|
||||
If a request exceeds the defined rate limit, the server will respond with:
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 429,
|
||||
"error": "Too many requests, Please try after a while!"
|
||||
}
|
||||
```
|
||||
|
||||
## Disabling Rate Limiting
|
||||
|
||||
For self-hosters, rate limiting can be disabled if necessary. However, we **strongly recommend keeping rate limiting enabled in production environments** to prevent abuse.
|
||||
|
||||
To disable rate limiting, set the following environment variable:
|
||||
|
||||
```bash
|
||||
RATE_LIMITING_DISABLED=1
|
||||
```
|
||||
|
||||
After making this change, restart your server to apply the new setting.
|
||||
@@ -144,6 +144,7 @@ export const navigation: NavGroup[] = [
|
||||
{ title: "Integrations", href: "/self-hosting/integrations" },
|
||||
{ title: "License", href: "/self-hosting/license" },
|
||||
{ title: "Cluster Setup", href: "/self-hosting/cluster-setup" },
|
||||
{ title: "Rate Limiting", href: "/self-hosting/rate-limiting" },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user