(expr string)
| 116 | } |
| 117 | |
| 118 | func hostFilter(expr string) iris.Filter { |
| 119 | regex := regexp.MustCompile(expr) |
| 120 | return func(ctx iris.Context) bool { |
| 121 | return regex.MatchString(ctx.Host()) |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | // HostsRedirectCode is the default status code is used |
| 126 | // to redirect a matching host to a url. |
searching dependent graphs…