|
@@ 530-535 (lines=6) @@
|
| 527 |
|
} |
| 528 |
|
|
| 529 |
|
if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) { |
| 530 |
|
if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) { |
| 531 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']); |
| 532 |
|
$proto = strtolower(trim($parts[0])); |
| 533 |
|
} else { |
| 534 |
|
$proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']); |
| 535 |
|
} |
| 536 |
|
|
| 537 |
|
// Verify that the protocol is always HTTP or HTTPS |
| 538 |
|
// default to http if an invalid value is provided |
|
@@ 696-701 (lines=6) @@
|
| 693 |
|
public function getInsecureServerHost() { |
| 694 |
|
$host = 'localhost'; |
| 695 |
|
if (isset($this->server['HTTP_X_FORWARDED_HOST'])) { |
| 696 |
|
if (strpos($this->server['HTTP_X_FORWARDED_HOST'], ',') !== false) { |
| 697 |
|
$parts = explode(',', $this->server['HTTP_X_FORWARDED_HOST']); |
| 698 |
|
$host = trim(current($parts)); |
| 699 |
|
} else { |
| 700 |
|
$host = $this->server['HTTP_X_FORWARDED_HOST']; |
| 701 |
|
} |
| 702 |
|
} else { |
| 703 |
|
if (isset($this->server['HTTP_HOST'])) { |
| 704 |
|
$host = $this->server['HTTP_HOST']; |