mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
use str_replace
This commit is contained in:
@@ -631,7 +631,7 @@ public function buildCertificateConf(string $path, string $url): void
|
||||
public function buildSecureNginxServer(string $url, string $siteConf = null): string
|
||||
{
|
||||
if ($siteConf === null) {
|
||||
$nginxVersion = ltrim(exec('nginx -v'), 'nginx version: nginx/');
|
||||
$nginxVersion = str_replace('nginx version: nginx/', '', exec('nginx -v'));
|
||||
$configFile = version_compare($nginxVersion, '1.25.1', ">=") ? 'secure.valet.conf' : 'secure.valet-legacy.conf';
|
||||
|
||||
$siteConf = $this->replaceOldLoopbackWithNew(
|
||||
@@ -777,7 +777,7 @@ public function proxyCreate(string $url, string $host, bool $secure = false): vo
|
||||
$proxyUrl .= '.'.$tld;
|
||||
}
|
||||
|
||||
$nginxVersion = ltrim(exec('nginx -v'), 'nginx version: nginx/');
|
||||
$nginxVersion = str_replace('nginx version: nginx/', '', exec('nginx -v'));
|
||||
$configFile = version_compare($nginxVersion, '1.25.1', ">=") ? 'secure.proxy.valet.conf' : 'secure.proxy.valet-legacy.conf';
|
||||
|
||||
$siteConf = $this->replaceOldLoopbackWithNew(
|
||||
|
||||
Reference in New Issue
Block a user