compileCORSRegexString compiles given string and adds anchors
(s string)
| 126 | |
| 127 | // compileCORSRegexString compiles given string and adds anchors |
| 128 | func compileCORSRegexString(s string) (*regexp.Regexp, error) { |
| 129 | r, err := relabel.NewRegexp(s) |
| 130 | if err != nil { |
| 131 | return nil, err |
| 132 | } |
| 133 | return r.Regexp, nil |
| 134 | } |
| 135 | |
| 136 | type API struct { |
| 137 | AuthMiddleware middleware.Interface |