final class HttpServerConfigDefinition extends AbstractConfigDefinition (View source)

Builds one composable layer of inbound HTTP server trust configuration.

Properties

protected mixed[] $data from  AbstractConfigDefinition

Methods

set(string $path, mixed $value)

Replaces one configuration value at a dot-separated path.

append(string $path, mixed $value)

Appends one configuration value at a dot-separated list path.

create()

Creates an empty definition that contributes only explicitly configured values.

static string

Returns the registry key under which inbound HTTP server definitions are collected.

string
trustedProxies(array $proxies)

Replaces the exact IP addresses and CIDR networks trusted as immediate proxy peers.

forwardedHeaderProfile(ForwardedHeaderProfile|string $profile)

Selects the only forwarding-header family accepted from trusted proxy peers.

trustForwardedPrefix(bool $trust = true)

Sets whether X-Forwarded-Prefix may be resolved after the proxy trust boundary is established.

allowedHosts(array $hosts)

Replaces exact hostnames and suffix wildcards approved for request-derived origins.

Details

toArray

No description

Return Value

array

fromArrayData

final static AbstractConfigDefinition fromArrayData(array $data)

No description

Parameters

array $data

Return Value

AbstractConfigDefinition

set

protected AbstractConfigDefinition set(string $path, mixed $value)

Replaces one configuration value at a dot-separated path.

Parameters

string $path
mixed $value

Return Value

AbstractConfigDefinition

append

protected AbstractConfigDefinition append(string $path, mixed $value)

Appends one configuration value at a dot-separated list path.

Parameters

string $path
mixed $value

Return Value

AbstractConfigDefinition

create

Creates an empty definition that contributes only explicitly configured values.

moduleKey

static string moduleKey()

Returns the registry key under which inbound HTTP server definitions are collected.

Return Value

string

trustedProxies

HttpServerConfigDefinition trustedProxies(array $proxies)

Replaces the exact IP addresses and CIDR networks trusted as immediate proxy peers.

Parameters

array $proxies

Return Value

HttpServerConfigDefinition

forwardedHeaderProfile

HttpServerConfigDefinition forwardedHeaderProfile(ForwardedHeaderProfile|string $profile)

Selects the only forwarding-header family accepted from trusted proxy peers.

Parameters

ForwardedHeaderProfile|string $profile

Return Value

HttpServerConfigDefinition

trustForwardedPrefix

HttpServerConfigDefinition trustForwardedPrefix(bool $trust = true)

Sets whether X-Forwarded-Prefix may be resolved after the proxy trust boundary is established.

Parameters

bool $trust

Return Value

HttpServerConfigDefinition

allowedHosts

HttpServerConfigDefinition allowedHosts(array $hosts)

Replaces exact hostnames and suffix wildcards approved for request-derived origins.

Parameters

array $hosts

Return Value

HttpServerConfigDefinition