Added support for HTTP header "X-Forwarded-Proto: https"
This commit is contained in:
parent
333bec112a
commit
a22476ffdf
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
|
||||
--------------
|
||||
|
||||
Breaking changes:
|
||||
|
||||
* API procedures:
|
||||
- "moveColumnUp" and "moveColumnDown" are replace by "changeColumnPosition"
|
||||
- "moveSwimlaneUp" and "moveSwimlaneDown" are replace by "changeSwimlanePosition"
|
||||
- "moveColumnUp" and "moveColumnDown" are replaced by "changeColumnPosition"
|
||||
- "moveSwimlaneUp" and "moveSwimlaneDown" are replaced by "changeSwimlanePosition"
|
||||
|
||||
New features:
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,11 @@ class Request extends Base
|
|||
*/
|
||||
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());
|
||||
$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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue