OutboundHostValidator class
Shared allowlist policy for server-side outbound requests.
A configured suffix matches both the exact host and its subdomains. The policy is disabled by default to preserve existing SDK behavior. Enabled policies require HTTPS without userinfo and restrict private addresses. Attachment downloaders additionally validate DNS answers and redirect hops.
Constructors
| Outbound |
Creates an outbound host validator. |
Properties
| enabled | Indicates whether allowlist enforcement is enabled. |
Methods
| is |
Determines whether a URL's host matches the configured allowlist. |
| is |
Checks the host policy and all resolved destination addresses before an attachment request. DNS prevalidation does not pin the HTTP connection to the checked addresses. |
Constructor Details
OutboundHostValidator(OutboundHostValidatorOptions)
Creates an outbound host validator.
new OutboundHostValidator(options?: OutboundHostValidatorOptions)
Parameters
- options
- OutboundHostValidatorOptions
The allowlist configuration.
Property Details
enabled
Indicates whether allowlist enforcement is enabled.
enabled: boolean
Property Value
boolean
Method Details
isAllowed(string | URL | null | undefined)
Determines whether a URL's host matches the configured allowlist.
function isAllowed(input: string | URL | null | undefined): boolean
Parameters
- input
-
string | URL | null | undefined
The absolute URL to validate.
Returns
boolean
true when validation is disabled or the host is allowed.
isAllowedAsync(string | URL | null | undefined)
Checks the host policy and all resolved destination addresses before an attachment request. DNS prevalidation does not pin the HTTP connection to the checked addresses.
function isAllowedAsync(input: string | URL | null | undefined): Promise<boolean>
Parameters
- input
-
string | URL | null | undefined
Returns
Promise<boolean>