@accelerated-software-development/caddy-api-client - v0.7.1
    Preparing search index...

    Function hostMatchesPattern

    • True when host matches pattern:

      • Exact: pattern === host.
      • Single-label *.tld: matches one extra label (case-sensitive). Only fires when the tail is a literal — *.api-*.tld is a generic glob, not a single-label match.
      • Generic glob: * becomes .* (crosses dots intentionally — only the single-label branch enforces label boundaries).

      Case-sensitive — lowercase both inputs for case-insensitive match.

      Parameters

      • host: string
      • pattern: string

      Returns boolean

      hostMatchesPattern("foo.example.com", "*.example.com")     // true
      hostMatchesPattern("a.b.example.com", "*.example.com") // false
      hostMatchesPattern("api-a.b.example.com", "api-*.example.com") // true (glob crosses dots)