Skip to content

Commit 5318504

Browse files
committed
Addressed feedbacks
1 parent 2a63628 commit 5318504

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/features/event-handler/rest.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ For scenarios where you need to handle arbitrary or deeply nested paths, you can
9999

100100
##### Using Regex Patterns
101101

102-
You can use standard [Regular Expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions){target="_blank" rel="nofollow"} in your route definitions, for example:
102+
You can use standard [regular expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions){target="_blank" rel="nofollow"} in your route definitions, for example:
103103

104104
| Pattern | Description | Examples |
105105
|-----------|------------------------------------------|-------------------------------------------------------------|
@@ -115,10 +115,9 @@ You can use standard [Regular Expressions](https://developer.mozilla.org/en-US/d
115115
```
116116

117117
???+ warning "Route Matching Priority"
118-
- Routes are matched in **order of specificity**, not registration order
118+
- For non-regex routes, routes are matched in **order of specificity**, not registration order
119119
- More specific routes (exact matches) take precedence over regex patterns
120-
- Among regex routes, the first registered matching route wins
121-
- Always place catch-all routes (`.*`) last
120+
- Among regex routes, registration order determines matching precedence, therefore, always place catch-all routes `/.*/` last
122121

123122
### HTTP Methods
124123

@@ -620,7 +619,7 @@ Let's assume you have `index.ts` as your Lambda function entrypoint and routes i
620619

621620
In the previous example, `split_route.ts` routes had a `/todos` prefix. This might grow over time and become repetitive.
622621

623-
When necessary, you can set a prefix when including a `Router` instance. This means you could remove `/todos` prefix altogether.
622+
When necessary, you can set a prefix when including a `Router` instance. This means you can remove `/todos` prefix altogether.
624623

625624
=== "split_route_prefix.ts"
626625

0 commit comments

Comments
 (0)