Sets the trusted proxies on the request to the value of trustedproxy.proxies

@param \Illuminate\Http\Request $request
160542
protected function setTrustedProxyIpAddresses(Request $request)
    {
        $trustedIps = $this->proxies ?: $this->config->get('trustedproxy.proxies');

        // Trust any IP address that calls us
        // `**` for backwards compatibility, but is deprecated
        if ($trustedIps === '*' || $trustedIps === '**') {
            return $this->setTrustedProxyIpAddressesToTheCallingIp($request);
        }

        // Support IPs addresses separated by comma
        $trustedIps = is_string($trustedIps) ? array_map('trim', explode(',', $trustedIps)) : $trustedIps;

        // Only trust specific IP addresses
        if (is_array($trustedIps)) {
            return $this->setTrustedProxyIpAddressesToSpecificIps($request, $trustedIps);
        }
    }
1268147
private function isFromTrustedProxy(Request $request)
    {
        return $request->getTrustedProxies() && IpUtils::checkIp($request->server->get('REMOTE_ADDR'), $request->getTrustedProxies());
    }
846877
public function setLang($request)
    {
        if (Auth::check()) {
            $user = Auth::user();

            // Set user locale
            if ($user->locale) {
                $this->setIfAllowed($user->locale);
            } else {
                if (config('localizer.set_auto_lang')) {
                    $this->setIfAllowed(Identify::lang()->getLanguage());
                } else {
                    $this->setIfAllowed(config('localizer.default_lang'));
                }
            }
        } else {
            if ($request->session()->has('locale')) {
                $this->setIfAllowed(session('locale'));
            } else {
                if (config('localizer.set_auto_lang')) {
                    $this->setIfAllowed(Identify::lang()->getLanguage());
                } else {
                    $this->setIfAllowed(config('localizer.default_lang'));
                }
            }
        }
    }
1287042
protected function cancelCookie(Request $request)
    {
        if (null !== $this->logger) {
            $this->logger->debug('Clearing remember-me cookie.', ['name' => $this->options['name']]);
        }

        $request->attributes->set(self::COOKIE_ATTR_NAME, new Cookie($this->options['name'], null, 1, $this->options['path'], $this->options['domain'], $this->options['secure'] ?? $request->isSecure(), $this->options['httponly'], false, $this->options['samesite'] ?? null));
    }
987842
public function handle(Request $request, Closure $next)
    {
        $request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
        $this->setTrustedProxyIpAddresses($request);

        return $next($request);
    }
808942
public function setRequest(Request $request)
    {
        $this->request = $request;

        $parsedBody = $this->request->getParsedBody();

        if (!empty($parsedBody)) {
            if (is_array($parsedBody)) {
                $this->data = array_map('trim', (array)$parsedBody);
            } else {
                $this->data = $parsedBody;
            }
        }

        return $this;
    }
488053
function setProxy($proxyHost, $proxyPort) {
      $this->useProxy = true;
      $this->proxyHost = $proxyHost;
      $this->proxyPort = $proxyPort;
    }
1322304
public function bindRequest(Request $request)
    {
        $this->request = $request;

        foreach ($this->request->postArray() as $key => $value) {
            if (isset($this->fieldSet[$key])) {
                $this->fieldSet[$key]->setValue($value);
            }
        }
    }
974172
public function setRouteNameFromRequest(Request $request)
    {
        $routeName = $this->routeTranslator->getRouteNameFromPath(
            $request->getUri(), $this->getCurrentLocale()
        );

        $this->routeTranslator->setCurrentRoute($routeName);
    }
758282
protected function parseDefaults(Request $request)
    {
        $this->ipv4         = ip2long($request->getClientIp());
        $this->userAgent    = $request->server('HTTP_USER_AGENT');
        $this->method       = $request->getMethod();
        $this->url          = urlSelf();

        if ($this->user === -1) {
            /** @var \Laranix\Auth\User\User $user */
            $user = $request->user();

            $this->user = $user === null ? null : $user->getAuthIdentifier();
        }
    }
163204
public static function useHttps(Request $request): bool
    {
        $checks = [
            'HTTPS',
            'SERVER_PORT',
            'HTTP_X_FORWARDED_SSL',
            'HTTP_X_FORWARDED_PROTO',
        ];
        foreach ($checks as $check) {
            if (call_user_func([__CLASS__, sprintf('check%s', Text::toCamelCase($check))], $request)) {
                return true;
            }
        }

        return false;
    }
811459
public function bind(Request $request)
    {
        $this->compileRoute();

        $this->parameters = (new RouteParameterBinder($this))
                        ->parameters($request);

        $this->originalParameters = $this->parameters;

        return $this;
    }
505894
public function setRouter($request)
    {
        $this->container->set('request', $request);
        $this->container->make(\Cygnite\Router\Router::class);
        $this->container->get('router')->setRequest($request);
        $this->router = $this->container->get('router');
    }
1105597
public function add($request)
    {
        $this->onBefore($request);
        array_push($this->_requests, $request);
        curl_multi_add_handle($this->_mh, $request->curl);
        $this->_updated = true;
    }
895973
public function save(\Illuminate\Http\Request $request)
    {
        $value = $this->getValueFromModel();

        if (! $this->isAllowedEmptyValue() && $this->getModel()->exists && empty($value)) {
            return;
        }

        parent::save($request);
    }
140213
protected function ipAddressCheck(Request $request)
    {
        $hostname = $request->getHttpHost();

        if (filter_var($hostname, FILTER_VALIDATE_IP)) {
            $message = "You are using the <strong>IP address</strong> <code>$hostname</code> as host name. This is known to cause problems with sessions.";
            $info = 'If you experience difficulties logging on, either configure your webserver to use a proper hostname, or use another browser.';

            $notice = json_encode([
                'severity' => 1,
                'notice'   => $message,
                'info'     => $info,
            ]);

            $this->app['logger.flash']->configuration($notice);
            if (in_array($this->app['request']->get('_route'), ['login', 'userfirst'])) {
                $this->app['logger.flash']->error($message . ' ' . $info);
            }
        }
    }
1164381
public function authenticate($request) {
		if(!$this->configured)
			return;
		
		$this->checkValidity();
		
		if($this->via == self::HTTP_HEADER)
			$request->addHeader($this->description->http_header, $this->token);
	}