Domain Patterns
Domain Patterns are used in a few places in DGate (Domain Resources and Proxy Config Allowed Domains) to match domain patterns (or IP patterns).
Pattern Types
Direct matching
Direct matching is the simplest form of pattern matching. The domain must match the pattern exactly.
Wildcards
Wildcards are used to match multiple paths. The wildcard character is *
.
Wildcards can be used in a few ways:
*
- matches any path*foo
- matches any path that ends withfoo
foo*
- matches any path that starts withfoo
*foo*
- matches any path that containsfoo
Regular Expressions
Regular expressions can be used to match specific patterns. The pattern must be enclosed in /
.
/^.+\.example.com$/
- matches any subdomain ofexample.com
/^example\.com$/
- matchesexample.com
exactly