MCPcopy
hub / github.com/caddyserver/caddy / isWildcardOrDefault

Method isWildcardOrDefault

modules/caddytls/automation.go:465–475  ·  view source on GitHub ↗

isWildcardOrDefault determines if the subjects include any wildcard domains, or is the "default" policy (i.e. no subjects) which is unbounded.

()

Source from the content-addressed store, hash-verified

463// isWildcardOrDefault determines if the subjects include any wildcard domains,
464// or is the "default" policy (i.e. no subjects) which is unbounded.
465func (ap *AutomationPolicy) isWildcardOrDefault() bool {
466 isWildcardOrDefault := len(ap.subjects) == 0
467
468 for _, sub := range ap.subjects {
469 if strings.HasPrefix(sub, "*") {
470 isWildcardOrDefault = true
471 break
472 }
473 }
474 return isWildcardOrDefault
475}
476
477// DefaultIssuers returns empty Issuers (not provisioned) to be used as defaults.
478// This function is experimental and has no compatibility promises.

Callers 2

makeCertMagicConfigMethod · 0.95
StartMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected