Added support for HTTP header "X-Forwarded-Proto: https"
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,11 +1,18 @@
|
|||||||
|
Version 1.0.27 (unreleased)
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Improvements:
|
||||||
|
|
||||||
|
* Added support for HTTP header "X-Forwarded-Proto: https"
|
||||||
|
|
||||||
Version 1.0.26
|
Version 1.0.26
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Breaking changes:
|
Breaking changes:
|
||||||
|
|
||||||
* API procedures:
|
* API procedures:
|
||||||
- "moveColumnUp" and "moveColumnDown" are replace by "changeColumnPosition"
|
- "moveColumnUp" and "moveColumnDown" are replaced by "changeColumnPosition"
|
||||||
- "moveSwimlaneUp" and "moveSwimlaneDown" are replace by "changeSwimlanePosition"
|
- "moveSwimlaneUp" and "moveSwimlaneDown" are replaced by "changeSwimlanePosition"
|
||||||
|
|
||||||
New features:
|
New features:
|
||||||
|
|
||||||
|
|||||||
@@ -211,7 +211,11 @@ class Request extends Base
|
|||||||
*/
|
*/
|
||||||
public function isHTTPS()
|
public function isHTTPS()
|
||||||
{
|
{
|
||||||
return isset($this->server['HTTPS']) && $this->server['HTTPS'] !== '' && $this->server['HTTPS'] !== 'off';
|
if ($this->getServerVariable('HTTP_X_FORWARDED_PROTO') === 'https') {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->getServerVariable('HTTPS') !== '' && $this->server['HTTPS'] !== 'off';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -102,6 +102,12 @@ class RequestTest extends Base
|
|||||||
|
|
||||||
$request = new Request($this->container, array('HTTPS' => '1'), array(), array(), array(), array());
|
$request = new Request($this->container, array('HTTPS' => '1'), array(), array(), array(), array());
|
||||||
$this->assertTrue($request->isHTTPS());
|
$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()
|
public function testGetCookie()
|
||||||
|
|||||||
Reference in New Issue
Block a user