Skip to content

Commit

Permalink
Updating MakesHttpRequests (#21351)
Browse files Browse the repository at this point in the history
This is a fix for setting remote ip for http tests with the ->get($url, [ 'REMOTE_ADDR' => $custom_ip ])

see #21350
  • Loading branch information
FinucaneDesign authored and taylorotwell committed Sep 23, 2017
1 parent 3a9ef5e commit 1bc8dd9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ protected function transformHeadersToServerVars(array $headers)
*/
protected function formatServerHeaderKey($name)
{
if (! Str::startsWith($name, 'HTTP_') && $name != 'CONTENT_TYPE') {
if (! Str::startsWith($name, 'HTTP_') && $name != 'CONTENT_TYPE' && $name != 'REMOTE_ADDR') {
return 'HTTP_'.$name;
}

Expand Down

0 comments on commit 1bc8dd9

Please sign in to comment.