Skip to content

Commit

Permalink
updated getTrustedHeaderNames to return without setting $this->headers
Browse files Browse the repository at this point in the history
  • Loading branch information
fideloper committed Jan 10, 2019
1 parent 44fa335 commit 207af4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/TrustProxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,17 @@ protected function getTrustedHeaderNames()
switch ($headers) {
case 'HEADER_X_FORWARDED_AWS_ELB':
case Request::HEADER_X_FORWARDED_AWS_ELB:
$this->headers = Request::HEADER_X_FORWARDED_AWS_ELB;
return Request::HEADER_X_FORWARDED_AWS_ELB;
break;
case 'HEADER_FORWARDED':
case Request::HEADER_FORWARDED:
$this->headers = Request::HEADER_FORWARDED;
return Request::HEADER_FORWARDED;
break;
default:
$this->headers = Request::HEADER_X_FORWARDED_ALL;
return Request::HEADER_X_FORWARDED_ALL;
}

return $this->headers;
// Should never reach this point
return $headers;
}
}

0 comments on commit 207af4b

Please sign in to comment.