PHP Класс Neos\Flow\Http\Component\TrustedProxiesComponent

Наследование: implements Neos\Flow\Http\Component\ComponentInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$settings array

Открытые методы

Метод Описание
handle ( ComponentContext $componentContext ) : void

Защищенные методы

Метод Описание
getFirstTrustedProxyHeaderValue ( string $type, Request $request ) : mixed | null Convenience getter for the first value of a given trusted proxy header.
getTrustedClientIpAddress ( Request $request ) : string | boolean Get the most trusted client's IP address.
getTrustedProxyHeaderValues ( string $type, Request $request ) : Iterator Get the values of trusted proxy header.
ipIsTrustedProxy ( string $ipAddress ) : boolean Check if the given IP address is from a trusted proxy.
isFromTrustedProxy ( Request $request ) : boolean Check if the given request is from a trusted proxy.

Описание методов

getFirstTrustedProxyHeaderValue() защищенный Метод

Convenience getter for the first value of a given trusted proxy header.
protected getFirstTrustedProxyHeaderValue ( string $type, Request $request ) : mixed | null
$type string One of the HEADER_* constants
$request Neos\Flow\Http\Request The request to get the trusted proxy header from
Результат mixed | null The first value of this header type or NULL if this header type should not be trusted

getTrustedClientIpAddress() защищенный Метод

This is the right-most address in the trusted client IP header, that is not a trusted proxy address. If all proxies are trusted, this is the left-most address in the header. If no proxies are trusted or no client IP header is trusted, this is the remote address of the machine directly connected to the server.
protected getTrustedClientIpAddress ( Request $request ) : string | boolean
$request Neos\Flow\Http\Request
Результат string | boolean The most trusted client's IP address or FALSE if no remote address can be found

getTrustedProxyHeaderValues() защищенный Метод

Get the values of trusted proxy header.
protected getTrustedProxyHeaderValues ( string $type, Request $request ) : Iterator
$type string One of the HEADER_* constants
$request Neos\Flow\Http\Request The request to get the trusted proxy header from
Результат Iterator An array of the values for this header type or NULL if this header type should not be trusted

handle() публичный Метод

public handle ( ComponentContext $componentContext ) : void
$componentContext ComponentContext
Результат void

ipIsTrustedProxy() защищенный Метод

Check if the given IP address is from a trusted proxy.
protected ipIsTrustedProxy ( string $ipAddress ) : boolean
$ipAddress string
Результат boolean

isFromTrustedProxy() защищенный Метод

Check if the given request is from a trusted proxy.
protected isFromTrustedProxy ( Request $request ) : boolean
$request Neos\Flow\Http\Request
Результат boolean If the server REMOTE_ADDR is from a trusted proxy

Описание свойств

$settings защищенное свойство

protected array $settings
Результат array