Метод |
Описание |
|
__construct ( array $headers = null ) |
Constructor. Defines de trusted headers. |
|
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface |
Execute the middleware. |
|
getIp ( Psr\Http\Message\ServerRequestInterface $request ) : string | null |
Return the client ip. |
|
getIps ( Psr\Http\Message\ServerRequestInterface $request ) : array | null |
Returns all ips found. |
|
headers ( array $headers ) : self |
Configure the trusted headers. |
|
remote ( boolean $remote = true ) : self |
To get the ip from a remote service. |
|