@@ 546-551 (lines=6) @@ | ||
543 | } |
|
544 | ||
545 | if (isset($this->server['HTTP_X_FORWARDED_PROTO'])) { |
|
546 | if (strpos($this->server['HTTP_X_FORWARDED_PROTO'], ',') !== false) { |
|
547 | $parts = explode(',', $this->server['HTTP_X_FORWARDED_PROTO']); |
|
548 | $proto = strtolower(trim($parts[0])); |
|
549 | } else { |
|
550 | $proto = strtolower($this->server['HTTP_X_FORWARDED_PROTO']); |
|
551 | } |
|
552 | ||
553 | // Verify that the protocol is always HTTP or HTTPS |
|
554 | // default to http if an invalid value is provided |
|
@@ 732-737 (lines=6) @@ | ||
729 | public function getInsecureServerHost() { |
|
730 | $host = 'localhost'; |
|
731 | if (isset($this->server['HTTP_X_FORWARDED_HOST'])) { |
|
732 | if (strpos($this->server['HTTP_X_FORWARDED_HOST'], ',') !== false) { |
|
733 | $parts = explode(',', $this->server['HTTP_X_FORWARDED_HOST']); |
|
734 | $host = trim(current($parts)); |
|
735 | } else { |
|
736 | $host = $this->server['HTTP_X_FORWARDED_HOST']; |
|
737 | } |
|
738 | } else { |
|
739 | if (isset($this->server['HTTP_HOST'])) { |
|
740 | $host = $this->server['HTTP_HOST']; |