Skip to content

Commit 54d9b06

Browse files
committed
docs(api-server): update rate limiting description for data route middleware
- Clarify that rate limiting is applied for non-admin and non-publisher users - Improve readability of middleware description
1 parent ee0adc6 commit 54d9b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/content/docs/api-server/architecture/middleware.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Here is the typical execution order for a request to a protected data endpoint l
2626

2727
3. **Data Route Middleware (`/routes/api/v1/data/_middleware.dart`)**
2828
- **Require Authentication:** Checks if a `User` object exists in the context. If not, it immediately aborts the request with a `401 Unauthorized` error.
29-
- **Rate Limiting:** If the user is not an admin, it applies a rate limit based on the user's ID. If the limit is exceeded, it aborts with a `429 Too Many Requests` error.
29+
- **Rate Limiting:** If the user is not an admin or a publisher, it applies a rate limit based on the user's ID. If the limit is exceeded, it aborts with a `429 Too Many Requests` error.
3030
- **Model Validation:** Validates the `?model=` query parameter and injects the corresponding `ModelConfig` into the context.
3131
- **Authorization:** Checks if the authenticated user has the required permissions to perform the requested action on the specified model. If not, it aborts with a `403 Forbidden` error.
3232

0 commit comments

Comments
 (0)