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

Method warnIfPolicyAllowsAll

modules/caddypki/acmeserver/acmeserver.go:220–233  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218}
219
220func (ash *Handler) warnIfPolicyAllowsAll() {
221 allow := ash.Policy.normalizeAllowRules()
222 deny := ash.Policy.normalizeDenyRules()
223 if allow != nil || deny != nil {
224 return
225 }
226
227 allowWildcardNames := ash.Policy != nil && ash.Policy.AllowWildcardNames
228 ash.logger.Warn(
229 "acme_server policy has no allow/deny rules; order identifiers are unrestricted (allow-all)",
230 zap.String("ca", ash.CA),
231 zap.Bool("allow_wildcard_names", allowWildcardNames),
232 )
233}
234
235func (ash Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error {
236 if strings.HasPrefix(r.URL.Path, ash.PathPrefix) {

Callers 2

ProvisionMethod · 0.95

Calls 4

normalizeAllowRulesMethod · 0.80
normalizeDenyRulesMethod · 0.80
StringMethod · 0.45
BoolMethod · 0.45

Tested by 1