protected function isFromTrustedProxy(Request $request)
    {
        $server = $request->getServerParams();
        if (!isset($server['REMOTE_ADDR'])) {
            return false;
        }
        return $this->ipIsTrustedProxy($server['REMOTE_ADDR']);
    }
protected function isFromTrustedProxy(Request $request)
    {
        $server = $request->getServerParams();
        if (!isset($server['REMOTE_ADDR'])) {
            return false;
        }
        return $this->ipIsTrustedProxy($server['REMOTE_ADDR']);
    }
protected function isFromTrustedProxy ( Request $ request ) { $ server = $ request -> getServerParams ( ) ; if ( ! isset ( $ server [ 'REMOTE_ADDR' ] ) ) { return false ; } return $ this -> ipIsTrustedProxy ( $ server [ 'REMOTE_ADDR' ] ) ; }
Check if the given request is from a trusted proxy.

@param Request $request
@return bool If the server REMOTE_ADDR is from a trusted proxy
Check if the given request is from a trusted proxy .