Neos\Flow\Tests\Unit\Http\Component\TrustedProxiesComponentTest::isSecureReturnsFalseIfTheRequestWasForwardedAndOriginallyWasHttp PHP Метод

isSecureReturnsFalseIfTheRequestWasForwardedAndOriginallyWasHttp() публичный Метод

    public function isSecureReturnsFalseIfTheRequestWasForwardedAndOriginallyWasHttp()
    {
        $server = array('HTTP_X_FORWARDED_PROTO' => 'http', 'HTTP_X_FORWARDED_PORT' => '80');
        $request = Request::create(new Uri('https://acme.com'), 'GET', array(), array(), $server);
        $trustedRequest = $this->callWithRequest($request);
        $this->assertEquals('http://acme.com', (string) $trustedRequest->getUri());
        $this->assertEquals('http', $trustedRequest->getUri()->getScheme());
        $this->assertFalse($trustedRequest->isSecure());
    }