|
@@ 596-601 (lines=6) @@
|
| 593 |
|
} |
| 594 |
|
|
| 595 |
|
if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) { |
| 596 |
|
if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) { |
| 597 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']); |
| 598 |
|
$proto = strtolower(trim($parts[0])); |
| 599 |
|
} else { |
| 600 |
|
$proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']); |
| 601 |
|
} |
| 602 |
|
|
| 603 |
|
// Verify that the protocol is always HTTP or HTTPS |
| 604 |
|
// default to http if an invalid value is provided |
|
@@ 763-768 (lines=6) @@
|
| 760 |
|
public function getInsecureServerHost() { |
| 761 |
|
$host = 'localhost'; |
| 762 |
|
if (isset($this->server['HTTP_X_FORWARDED_HOST'])) { |
| 763 |
|
if (strpos($this->server['HTTP_X_FORWARDED_HOST'], ',') !== false) { |
| 764 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_HOST']); |
| 765 |
|
$host = trim(current($parts)); |
| 766 |
|
} else { |
| 767 |
|
$host = $this->server['HTTP_X_FORWARDED_HOST']; |
| 768 |
|
} |
| 769 |
|
} else { |
| 770 |
|
if (isset($this->server['HTTP_HOST'])) { |
| 771 |
|
$host = $this->server['HTTP_HOST']; |