You are here

public function HttpCacheTest::testClientIpIsAlwaysLocalhostForForwardedRequests in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php \Symfony\Component\HttpKernel\Tests\HttpCache\HttpCacheTest::testClientIpIsAlwaysLocalhostForForwardedRequests()

File

vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php, line 1135

Class

HttpCacheTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testClientIpIsAlwaysLocalhostForForwardedRequests() {
  $this
    ->setNextResponse();
  $this
    ->request('GET', '/', array(
    'REMOTE_ADDR' => '10.0.0.1',
  ));
  $this
    ->assertEquals('127.0.0.1', $this->kernel
    ->getBackendRequest()->server
    ->get('REMOTE_ADDR'));
}