HttpsDestinationPolicy
class HttpsDestinationPolicy extends PublicDestinationPolicy
Constants
| protected DISALLOWED_NETWORKS |
|
Methods
Create a new public destination policy instance.
Resolve a public HTTPS destination, including each redirect target.
Validate a registered URL without making a network request.
Return an approved proxy for the destination.
Determine whether a non-public address may be used.
Resolve every address for a hostname.
Resolve one address family within its share of the request budget.
Reject plaintext endpoints before destination resolution.
Details
in
PublicDestinationPolicy at line 48
__construct(array $allowedNetworks = [])
Create a new public destination policy instance.
at line 16
ResolvedDestination
resolve(string $url, float $timeoutSeconds)
Resolve a public HTTPS destination, including each redirect target.
at line 26
void
validate(string $url)
Validate a registered URL without making a network request.
in
PublicDestinationPolicy at line 125
protected string|null
proxyFor(UriInterface $uri)
Return an approved proxy for the destination.
Applications that require trusted egress proxies may extend this policy and select an absolute URL from a bounded operator-configured set. The policy then vets and pins only the proxy: hostname targets are resolved by the proxy, so it must enforce the same destination rules itself.
in
PublicDestinationPolicy at line 136
protected bool
allowsAddress(UriInterface $uri, string $address)
Determine whether a non-public address may be used.
Applications may narrowly allow known internal destinations by extending this policy. Every resolved address must be allowed.
in
PublicDestinationPolicy at line 148
protected array
resolveHost(string $host, float $timeoutSeconds)
Resolve every address for a hostname.
in
PublicDestinationPolicy at line 185
protected array|false
resolveAddressFamily(string $host, int $family, float $timeoutSeconds)
Resolve one address family within its share of the request budget.
at line 36
protected void
ensureHttps(string $url)
Reject plaintext endpoints before destination resolution.