Skip to content

Commit

Permalink
Merge pull request #6091 from getkirby/fix/6088-ddev-local
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative authored Dec 23, 2023
2 parents ba8e9e5 + 8393bb4 commit 8eed778
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 function providerForServerNames()
['localhost', true],
['mydomain.local', true],
['mydomain.test', true],
['mydomain.ddev.site', true],
['mydomain.com', false],
['mydomain.dev', false],
];
Expand Down

0 comments on commit 8eed778

Please sign in to comment.