Add a note on case insensitive regex matching
This commit is contained in:
parent
1c9a7b8c61
commit
a4b447256b
1 changed files with 13 additions and 12 deletions
|
@ -234,7 +234,7 @@ If the rule is verified, the router becomes active, calls middlewares, and then
|
||||||
The table below lists all the available matchers:
|
The table below lists all the available matchers:
|
||||||
|
|
||||||
| Rule | Description |
|
| Rule | Description |
|
||||||
|------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
|--------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||||
| ```Headers(`key`, `value`)``` | Check if there is a key `key`defined in the headers, with the value `value` |
|
| ```Headers(`key`, `value`)``` | Check if there is a key `key`defined in the headers, with the value `value` |
|
||||||
| ```HeadersRegexp(`key`, `regexp`)``` | Check if there is a key `key`defined in the headers, with a value that matches the regular expression `regexp` |
|
| ```HeadersRegexp(`key`, `regexp`)``` | Check if there is a key `key`defined in the headers, with a value that matches the regular expression `regexp` |
|
||||||
| ```Host(`example.com`, ...)``` | Check if the request domain (host header value) targets one of the given `domains`. |
|
| ```Host(`example.com`, ...)``` | Check if the request domain (host header value) targets one of the given `domains`. |
|
||||||
|
@ -259,6 +259,7 @@ The table below lists all the available matchers:
|
||||||
The regexp name (`name` in the above example) is an arbitrary value, that exists only for historical reasons.
|
The regexp name (`name` in the above example) is an arbitrary value, that exists only for historical reasons.
|
||||||
|
|
||||||
Any `regexp` supported by [Go's regexp package](https://golang.org/pkg/regexp/) may be used.
|
Any `regexp` supported by [Go's regexp package](https://golang.org/pkg/regexp/) may be used.
|
||||||
|
For example, here is a case insensitive path matcher syntax: ```Path(`/{path:(?i:Products)}`)```.
|
||||||
|
|
||||||
!!! info "Combining Matchers Using Operators and Parenthesis"
|
!!! info "Combining Matchers Using Operators and Parenthesis"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue