mirror of
https://github.com/laravel/valet.git
synced 2026-02-07 09:10:03 +01:00
Fix bug with certificate search for TLDs of other than 3 chars
The `substr` of `-8` was based on `.dev.crt`, but since the TLD has always been configurable, this should have always been dynamic. Running `valet links` will not show `https` or the `TLS` columns correctly if the substring matching is of the wrong length.
This commit is contained in:
@@ -85,7 +85,8 @@ function getCertificates($path)
|
||||
return collect($this->files->scanDir($path))->filter(function ($value, $key) {
|
||||
return ends_with($value, '.crt');
|
||||
})->map(function ($cert) {
|
||||
return substr($cert, 0, -8);
|
||||
$tld = $this->config->read()['tld'];
|
||||
return substr($cert, 0, -(strlen($tld)+5));
|
||||
})->flip();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user