mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Document cowboy_router host/path matching order
Explaining better how to write routes, coming from this misunderstanding: https://github.com/ninenines/cowboy/issues/1448
This commit is contained in:
parent
0d0e7d164c
commit
fb4fee3bd2
1 changed files with 5 additions and 0 deletions
|
@ -49,6 +49,11 @@ constraints.
|
|||
The match syntax is used to associate host names and paths with their
|
||||
respective handlers.
|
||||
|
||||
The handler is chosen by following only the first matching host and for
|
||||
this host only the first matching path. Beware that this means: if two
|
||||
hosts match but only the second includes a matching path, the request will
|
||||
be denied.
|
||||
|
||||
The match syntax is the same for host and path with a few subtleties.
|
||||
Indeed, the segments separator is different, and the host is matched
|
||||
starting from the last segment going to the first. All examples will
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue