0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +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:
Marius Melzer 2020-04-18 16:46:47 +02:00 committed by GitHub
parent 0d0e7d164c
commit fb4fee3bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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