Case insensitive host rule
This commit is contained in:
parent
22ee8700ca
commit
aa26927d61
4 changed files with 45 additions and 5 deletions
6
vendor/github.com/containous/mux/regexp.go
generated
vendored
6
vendor/github.com/containous/mux/regexp.go
generated
vendored
|
@ -53,6 +53,12 @@ func newRouteRegexp(tpl string, matchHost, matchPrefix, matchQuery, strictSlash,
|
|||
varsN := make([]string, len(idxs)/2)
|
||||
varsR := make([]*regexp.Regexp, len(idxs)/2)
|
||||
pattern := bytes.NewBufferString("")
|
||||
|
||||
// Host matching is case insensitive
|
||||
if matchHost {
|
||||
fmt.Fprint(pattern, "(?i)")
|
||||
}
|
||||
|
||||
pattern.WriteByte('^')
|
||||
reverse := bytes.NewBufferString("")
|
||||
var end int
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue