Condukt.Sandbox.NetworkPolicy.Hosts (Condukt v1.5.0)

Copy Markdown View Source

Host glob matching shared by the AllowHosts and DenyHosts rules.

Syntax:

  • * matches a single DNS label (no dots).
  • ** matches one or more dot-separated labels.
  • Literal characters match themselves; comparison is case-insensitive.

Examples:

"api.github.com"     # literal
"*.openai.com"       # one label before the suffix
"**.googleapis.com"  # one or more labels before the suffix

Summary

Functions

Single-pattern match. See module docs for the glob syntax.

Returns whether host matches any pattern in the given list.

Functions

matches?(host, pattern)

Single-pattern match. See module docs for the glob syntax.

matches_any?(host, patterns)

Returns whether host matches any pattern in the given list.