OutboundUrlPolicy

Which URLs and addresses a fetch may reach, and the TransportSettings that go with that choice. A closed pair: Trusted for a known upstream, Untrusted for a URL a third party supplied.

Stable Core. sealed because the closed pair is the contract; build one with trusted or untrusted. No Untrusted parameter admits an address or name its tables deny: to fetch from a private address use Trusted. The policy decides; a transport enforces. A when over a policy needs no else.

Inheritors

Types

Link copied to clipboard
object Companion

The factories.

Link copied to clipboard

The policy for a known upstream: it checks the scheme, optionally pins the host, and applies the downgrade rule. It does no address filtering, has no name rule and no port rule, so a private address is fetchable.

Link copied to clipboard

The policy for a URL a third party supplied. Per hop it refuses a lenient or malformed host form, a single-label name, a reserved name, a denied IP literal and a port outside allowedPorts; for every resolved address and every connect it refuses a denied address; it never uses a proxy; and it refuses a request that carries a sensitive header (Authorization, Proxy-Authorization, Cookie, Set-Cookie or any header added as sensitive).

Properties

Link copied to clipboard

The caps, timeouts and concurrency limits that go with this policy.