|
@@ 610-615 (lines=6) @@
|
| 607 |
|
} |
| 608 |
|
|
| 609 |
|
if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) { |
| 610 |
|
if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) { |
| 611 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']); |
| 612 |
|
$proto = strtolower(trim($parts[0])); |
| 613 |
|
} else { |
| 614 |
|
$proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']); |
| 615 |
|
} |
| 616 |
|
|
| 617 |
|
// Verify that the protocol is always HTTP or HTTPS |
| 618 |
|
// default to http if an invalid value is provided |
|
@@ 773-778 (lines=6) @@
|
| 770 |
|
public function getInsecureServerHost() { |
| 771 |
|
$host = 'localhost'; |
| 772 |
|
if (isset($this->server['HTTP_X_FORWARDED_HOST'])) { |
| 773 |
|
if (strpos($this->server['HTTP_X_FORWARDED_HOST'], ',') !== false) { |
| 774 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_HOST']); |
| 775 |
|
$host = trim(current($parts)); |
| 776 |
|
} else { |
| 777 |
|
$host = $this->server['HTTP_X_FORWARDED_HOST']; |
| 778 |
|
} |
| 779 |
|
} else { |
| 780 |
|
if (isset($this->server['HTTP_HOST'])) { |
| 781 |
|
$host = $this->server['HTTP_HOST']; |