mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-28 07:44:56 +00:00
docs: secure,layer,implementation (1 files)
This commit is contained in:
@@ -87,14 +87,13 @@ Every database operation requires:
|
||||
### 2. Rate Limiting
|
||||
|
||||
Prevents abuse by limiting requests per user:
|
||||
- **100 requests per 60 seconds** per user
|
||||
- **100 requests per 60 seconds** per user (defaults)
|
||||
- Automatic cleanup of old timestamps
|
||||
- Tracks per userId, not IP (more accurate)
|
||||
|
||||
```typescript
|
||||
private static readonly RATE_LIMIT_WINDOW = 60000 // 1 minute
|
||||
private static readonly MAX_REQUESTS_PER_WINDOW = 100
|
||||
```
|
||||
Override defaults with environment variables:
|
||||
- `MB_RATE_LIMIT_WINDOW_MS` (milliseconds)
|
||||
- `MB_RATE_LIMIT_MAX_REQUESTS` (positive integer)
|
||||
|
||||
### 3. Input Sanitization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user