PHP 클래스 Neos\Flow\Http\Component\TrustedProxiesComponent

상속: implements Neos\Flow\Http\Component\ComponentInterface
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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