HttpServerConfig
final class HttpServerConfig (View source)
Carries the immutable trust policy used to resolve externally visible request metadata.
Methods
Captures normalized proxy networks, header policy and host allowlist.
Returns the exact IP addresses and CIDR networks permitted to supply forwarding metadata.
Returns the single forwarding-header family accepted from a trusted peer.
Reports whether a trusted X-Forwarded-Prefix value may contribute the external path prefix.
Returns exact hostnames and suffix wildcards approved for canonical request metadata.
Details
__construct
__construct(array $trustedProxies, ForwardedHeaderProfile $forwardedHeaderProfile, bool $trustForwardedPrefix, array $allowedHosts)
Captures normalized proxy networks, header policy and host allowlist.
trustedProxies
array
trustedProxies()
Returns the exact IP addresses and CIDR networks permitted to supply forwarding metadata.
forwardedHeaderProfile
ForwardedHeaderProfile
forwardedHeaderProfile()
Returns the single forwarding-header family accepted from a trusted peer.
trustsForwardedPrefix
bool
trustsForwardedPrefix()
Reports whether a trusted X-Forwarded-Prefix value may contribute the external path prefix.
allowedHosts
array
allowedHosts()
Returns exact hostnames and suffix wildcards approved for canonical request metadata.
An empty list approves no request-derived host.