Skip to content

Commit

Permalink
Merge branch 'develop-patch' into develop-minor
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Dec 27, 2023
2 parents aad45f8 + 8eed778 commit 9ddc04d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,10 @@ public function isLocal(): bool
return true;
}

if (Str::endsWith($host, '.ddev.site') === true) {
return true;
}

// collect all possible visitor ips
$ips = [
$this->get('REMOTE_ADDR'),
Expand Down
1 change: 1 addition & 0 deletions tests/Http/EnvironmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,7 @@ public static function isLocalWithServerNameProvider(): array
['localhost', true],
['mydomain.local', true],
['mydomain.test', true],
['mydomain.ddev.site', true],
['mydomain.com', false],
['mydomain.dev', false],
];
Expand Down

0 comments on commit 9ddc04d

Please sign in to comment.