|
@@ 644-649 (lines=6) @@
|
| 641 |
|
} |
| 642 |
|
|
| 643 |
|
if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) { |
| 644 |
|
if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) { |
| 645 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']); |
| 646 |
|
$proto = strtolower(trim($parts[0])); |
| 647 |
|
} else { |
| 648 |
|
$proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']); |
| 649 |
|
} |
| 650 |
|
|
| 651 |
|
// Verify that the protocol is always HTTP or HTTPS |
| 652 |
|
// default to http if an invalid value is provided |
|
@@ 807-812 (lines=6) @@
|
| 804 |
|
public function getInsecureServerHost() { |
| 805 |
|
$host = 'localhost'; |
| 806 |
|
if (isset($this->server['HTTP_X_FORWARDED_HOST'])) { |
| 807 |
|
if (strpos($this->server['HTTP_X_FORWARDED_HOST'], ',') !== false) { |
| 808 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_HOST']); |
| 809 |
|
$host = trim(current($parts)); |
| 810 |
|
} else { |
| 811 |
|
$host = $this->server['HTTP_X_FORWARDED_HOST']; |
| 812 |
|
} |
| 813 |
|
} else { |
| 814 |
|
if (isset($this->server['HTTP_HOST'])) { |
| 815 |
|
$host = $this->server['HTTP_HOST']; |