Skip to content

Commit 91fb4c8

Browse files
committed
fix: feedbacks
1 parent 72af572 commit 91fb4c8

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

9.0.0.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,36 @@ Parse Server 9 standardizes the route pattern syntax across cloud routes and rat
1515
- **Deprecation**: Old wildcard route syntax is deprecated and will trigger a clear error message.
1616

1717
### Migration Steps
18+
19+
#### Path Syntax Examples
20+
21+
Update your rate limit configurations to use the new path-to-regexp v8 syntax:
22+
23+
| Old Syntax (deprecated) | New Syntax (v8) |
24+
|------------------------|-----------------|
25+
| `/functions/*` | `/functions/*path` |
26+
| `/classes/*` | `/classes/*path` |
27+
| `/*` | `/*path` |
28+
| `*` | `*path` |
29+
30+
**Before:**
31+
```javascript
32+
rateLimit: {
33+
requestPath: '/functions/*',
34+
requestTimeWindow: 10000,
35+
requestCount: 100
36+
}
37+
```
38+
39+
**After:**
40+
```javascript
41+
rateLimit: {
42+
requestPath: '/functions/*path',
43+
requestTimeWindow: 10000,
44+
requestCount: 100
45+
}
46+
```
47+
1848
- Review your custom cloud routes and ensure they use the new path-to-regexp v8 syntax.
1949
- Update any rate-limiting configurations to use the new route path format.
2050
- Test your application to ensure all routes work as expected with the new syntax.

src/Options/Definitions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ module.exports.RateLimitOptions = {
678678
requestPath: {
679679
env: 'PARSE_SERVER_RATE_LIMIT_REQUEST_PATH',
680680
help:
681-
'The path of the API route to be rate limited. Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings, string patterns, or regular expression. See: https://expressjs.com/en/guide/routing.html',
681+
'The path of the API route to be rate limited. Route paths, in combination with a request method, define the endpoints at which requests can be made. Route paths can be strings or string patterns following path-to-regexp v8 syntax. Wildcards must be named (e.g., `/*path` instead of `/*`). Examples: `/functions/*path`, `/classes/MyClass/*path`, `/*path`. See: https://github.com/pillarjs/path-to-regexp',
682682
required: true,
683683
},
684684
requestTimeWindow: {

src/Options/docs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)