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

Function automationPolicyHasAllPublicNames

caddyconfig/httpcaddyfile/tlsapp.go:1185–1189  ·  view source on GitHub ↗

automationPolicyHasAllPublicNames returns true if all the names on the policy do NOT qualify for public certs OR are tailscale domains.

(ap *caddytls.AutomationPolicy)

Source from the content-addressed store, hash-verified

1183// automationPolicyHasAllPublicNames returns true if all the names on the policy
1184// do NOT qualify for public certs OR are tailscale domains.
1185func automationPolicyHasAllPublicNames(ap *caddytls.AutomationPolicy) bool {
1186 return !slices.ContainsFunc(ap.SubjectsRaw, func(i string) bool {
1187 return !subjectQualifiesForPublicCert(ap, i) || isTailscaleDomain(i)
1188 })
1189}
1190
1191func isTailscaleDomain(name string) bool {
1192 return strings.HasSuffix(strings.ToLower(name), ".ts.net")

Callers 1

buildTLSAppMethod · 0.85

Calls 2

isTailscaleDomainFunction · 0.70

Tested by

no test coverage detected