Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about wildcard routing limitations #336

Merged
merged 1 commit into from
Apr 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion website/docs/guide/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you want to register it for some methods use `Echo.Match(methods []string, pa
Echo defines handler function as `func(echo.Context) error` where `echo.Context` primarily
holds HTTP request and response interfaces.

## Match-any
## Match-any / wildcard

Matches zero or more characters in the path. For example, pattern `/users/*` will
match:
Expand All @@ -40,6 +40,13 @@ match:
- `/users/1/files/1`
- `/users/anything...`

:::caution

There can be only one effective match-any parameter in route. When route is added with multiple match-any
`/v1/*/images/*`. The router matches always the first `*` till the end of requst URL i.e. it works as `/v1/*`.

:::

## Path Matching Order

- Static
Expand Down