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

Breadcrumb

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

Request::TRUSTED_HEADERS

Names for headers that can be trusted when using trusted proxies.

The FORWARDED header is the standard as of rfc7239.

The other headers are non-standard, but widely used by popular reverse proxies (like Apache mod_proxy or Amazon EC2).

File

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

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

private const TRUSTED_HEADERS = [
    self::HEADER_FORWARDED => 'FORWARDED',
    self::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
    self::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
    self::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
    self::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
    self::HEADER_X_FORWARDED_PREFIX => 'X_FORWARDED_PREFIX',
];

API Navigation

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