MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / match

Method match

tools/mage/headers.go:53–69  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

51}
52
53func (r *HeaderRule) match(path string) (match bool) {
54 if len(r.Include) > 0 {
55 for _, item := range r.Include {
56 if strings.Contains(path, item) {
57 match = true
58 }
59 }
60 } else {
61 match = true
62 }
63 for _, item := range r.Exclude {
64 if strings.Contains(path, item) {
65 return false
66 }
67 }
68 return
69}
70
71// HeaderConfig is the format of the header configuration file.
72type HeaderConfig struct {

Callers 15

serve-dev-webui.jsFile · 0.80
getMethod · 0.80
index.jsFile · 0.80
mapNatsFormValuesFunction · 0.80
index.jsFile · 0.80
imageDataTransformFunction · 0.80
index.jsFile · 0.80
utils.jsFile · 0.80
index.jsFile · 0.80
cookie.jsFile · 0.80
host-from-url.jsFile · 0.80
toMessagePropsFunction · 0.80

Calls 1

ContainsMethod · 0.65

Tested by 1

hexToBase64Function · 0.64