Skip to content

Commit

Permalink
set the ip if null
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonvarga committed Aug 22, 2023
1 parent 23543aa commit 11c6b89
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function site()

public function toResponse($request)
{
if (is_null($request->ip())) {
$request->server->add(['REMOTE_ADDR' => '0.0.0.0']);
}

$kernel = app(Kernel::class);
$response = $kernel->handle($request);
$kernel->terminate($request, $response);
Expand Down

0 comments on commit 11c6b89

Please sign in to comment.