Added support for HTTP header "X-Forwarded-Proto: https"

This commit is contained in:
Frederic Guillot
2016-02-28 20:00:11 -05:00
parent 333bec112a
commit a22476ffdf
3 changed files with 20 additions and 3 deletions

View File

@@ -102,6 +102,12 @@ class RequestTest extends Base
$request = new Request($this->container, array('HTTPS' => '1'), array(), array(), array(), array());
$this->assertTrue($request->isHTTPS());
$request = new Request($this->container, array('HTTP_X_FORWARDED_PROTO' => 'https'), array(), array(), array(), array());
$this->assertTrue($request->isHTTPS());
$request = new Request($this->container, array('HTTP_X_FORWARDED_PROTO' => 'http'), array(), array(), array(), array());
$this->assertFalse($request->isHTTPS());
}
public function testGetCookie()