TrustedProxyMiddleware
class TrustedProxyMiddleware implements HTTPMiddleware
This middleware will rewrite headers that provide IP and host details from an upstream proxy.
Methods
Return the comma-separated list of IP ranges that are trusted to provide proxy headers Can also be 'none' or '*' (all)
Set the comma-separated list of IP ranges that are trusted to provide proxy headers Can also be 'none' or '*' (all)
Return the array of headers from which to lookup the hostname
Set the array of headers from which to lookup the hostname.
Return the array of headers from which to lookup the client IP
Set the array of headers from which to lookup the client IP.
Return the array of headers from which to lookup the client scheme (http/https)
Set array of headers from which to lookup the client scheme (http/https) Can also specify comma-separated list as a single string.
Details
at line 56
string
getTrustedProxyIPs()
Return the comma-separated list of IP ranges that are trusted to provide proxy headers Can also be 'none' or '*' (all)
at line 68
$this
setTrustedProxyIPs(string $trustedProxyIPs)
Set the comma-separated list of IP ranges that are trusted to provide proxy headers Can also be 'none' or '*' (all)
at line 79
array
getProxyHostHeaders()
Return the array of headers from which to lookup the hostname
at line 90
$this
setProxyHostHeaders(array $proxyHostHeaders)
Set the array of headers from which to lookup the hostname.
at line 101
array
getProxyIPHeaders()
Return the array of headers from which to lookup the client IP
at line 112
$this
setProxyIPHeaders(array $proxyIPHeaders)
Set the array of headers from which to lookup the client IP.
at line 123
array
getProxySchemeHeaders()
Return the array of headers from which to lookup the client scheme (http/https)
at line 135
$this
setProxySchemeHeaders(array $proxySchemeHeaders)
Set array of headers from which to lookup the client scheme (http/https) Can also specify comma-separated list as a single string.
at line 141
HTTPResponse
process(HTTPRequest $request, callable $delegate)
Generate response for the given request