fixed indending + closed own internal todo: better usage of x()
removed todo Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
parent
48a1d97f46
commit
83dec2f815
1 changed files with 7 additions and 8 deletions
11
boot.php
11
boot.php
|
@ -655,12 +655,12 @@ class App {
|
||||||
|
|
||||||
|
|
||||||
$this->scheme = 'http';
|
$this->scheme = 'http';
|
||||||
/// @TODO x() should be better used here ...
|
|
||||||
if ((x($_SERVER, 'HTTPS') && $_SERVER['HTTPS']) ||
|
if ((x($_SERVER, 'HTTPS') && $_SERVER['HTTPS']) ||
|
||||||
(x($_SERVER['HTTP_FORWARDED']) && preg_match("/proto=https/", $_SERVER['HTTP_FORWARDED'])) ||
|
(x($_SERVER, 'HTTP_FORWARDED') && preg_match("/proto=https/", $_SERVER['HTTP_FORWARDED'])) ||
|
||||||
(x($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ||
|
(x($_SERVER, 'HTTP_X_FORWARDED_PROTO') && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ||
|
||||||
(x($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') ||
|
(x($_SERVER, 'HTTP_X_FORWARDED_SSL') && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') ||
|
||||||
(x($_SERVER['FRONT_END_HTTPS']) && $_SERVER['FRONT_END_HTTPS'] == 'on') ||
|
(x($_SERVER, 'FRONT_END_HTTPS') && $_SERVER['FRONT_END_HTTPS'] == 'on') ||
|
||||||
(x($_SERVER, 'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) // XXX: reasonable assumption, but isn't this hardcoding too much?
|
(x($_SERVER, 'SERVER_PORT') && (intval($_SERVER['SERVER_PORT']) == 443)) // XXX: reasonable assumption, but isn't this hardcoding too much?
|
||||||
) {
|
) {
|
||||||
$this->scheme = 'https';
|
$this->scheme = 'https';
|
||||||
|
@ -1367,7 +1367,6 @@ class App {
|
||||||
// add baseurl to args. cli scripts can't construct it
|
// add baseurl to args. cli scripts can't construct it
|
||||||
$args[] = $this->get_baseurl();
|
$args[] = $this->get_baseurl();
|
||||||
|
|
||||||
/// @TODO let's replace these with a foreach($key => $value) loop
|
|
||||||
for ($x = 0; $x < count($args); $x ++) {
|
for ($x = 0; $x < count($args); $x ++) {
|
||||||
$args[$x] = escapeshellarg($args[$x]);
|
$args[$x] = escapeshellarg($args[$x]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue