Skip to content

Commit bd752e5

Browse files
authored
Allow overriding REMOTE_ADDR (#187)
See this issue/PR for details: laravel/framework#21350
1 parent 5f1056a commit bd752e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Concerns/MakesHttpRequests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ protected function transformHeadersToServerVars(array $headers)
677677
foreach ($headers as $name => $value) {
678678
$name = strtr(strtoupper($name), '-', '_');
679679

680-
if (! Str::startsWith($name, $prefix) && $name != 'CONTENT_TYPE') {
680+
if (! Str::startsWith($name, $prefix) && $name != 'CONTENT_TYPE' && $name != 'REMOTE_ADDR') {
681681
$name = $prefix.$name;
682682
}
683683

0 commit comments

Comments
 (0)