MCPcopy Index your code
hub / github.com/cortexproject/cortex / compileCORSRegexString

Function compileCORSRegexString

pkg/api/api.go:128–134  ·  view source on GitHub ↗

compileCORSRegexString compiles given string and adds anchors

(s string)

Source from the content-addressed store, hash-verified

126
127// compileCORSRegexString compiles given string and adds anchors
128func 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
136type API struct {
137 AuthMiddleware middleware.Interface

Callers 1

NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected