automationPolicyHasAllPublicNames returns true if all the names on the policy do NOT qualify for public certs OR are tailscale domains.
(ap *caddytls.AutomationPolicy)
| 1183 | // automationPolicyHasAllPublicNames returns true if all the names on the policy |
| 1184 | // do NOT qualify for public certs OR are tailscale domains. |
| 1185 | func 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 | |
| 1191 | func isTailscaleDomain(name string) bool { |
| 1192 | return strings.HasSuffix(strings.ToLower(name), ".ts.net") |
no test coverage detected