Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Request.php

function Request::isFromTrustedProxy

Indicates whether this request originated from a trusted proxy.

This can be useful to determine whether or not to trust the contents of a proxy-specific header.

6 calls to Request::isFromTrustedProxy()
Request::getBaseUrl in vendor/symfony/http-foundation/Request.php
Returns the root URL from which this request is executed.
Request::getClientIps in vendor/symfony/http-foundation/Request.php
Returns the client IP addresses.
Request::getHost in vendor/symfony/http-foundation/Request.php
Returns the host name.
Request::getPort in vendor/symfony/http-foundation/Request.php
Returns the port on which the request is made.
Request::getProtocolVersion in vendor/symfony/http-foundation/Request.php
Returns the protocol version.

... See full list

File

vendor/symfony/http-foundation/Request.php, line 1986

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public function isFromTrustedProxy() : bool {
    return self::$trustedProxies && IpUtils::checkIp($this->server
        ->get('REMOTE_ADDR', ''), self::$trustedProxies);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal