diff --git a/lib/Raven/Client.php b/lib/Raven/Client.php index 751c5fa59..40a450f0f 100644 --- a/lib/Raven/Client.php +++ b/lib/Raven/Client.php @@ -1322,8 +1322,8 @@ protected function isHttps() } if (!empty($this->trust_x_forwarded_proto) && - !empty($_SERVER['X-FORWARDED-PROTO']) && - $_SERVER['X-FORWARDED-PROTO'] === 'https') { + !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && + $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') { return true; } diff --git a/test/Raven/Tests/ClientTest.php b/test/Raven/Tests/ClientTest.php index 528eddabe..022e225b0 100644 --- a/test/Raven/Tests/ClientTest.php +++ b/test/Raven/Tests/ClientTest.php @@ -1650,7 +1650,7 @@ public function currentUrlProvider() array( 'REQUEST_URI' => '/', 'HTTP_HOST' => 'example.com', - 'X-FORWARDED-PROTO' => 'https' + 'HTTP_X_FORWARDED_PROTO' => 'https' ), array(), 'http://example.com/', @@ -1660,7 +1660,7 @@ public function currentUrlProvider() array( 'REQUEST_URI' => '/', 'HTTP_HOST' => 'example.com', - 'X-FORWARDED-PROTO' => 'https' + 'HTTP_X_FORWARDED_PROTO' => 'https' ), array('trust_x_forwarded_proto' => true), 'https://example.com/',