mirror of
https://github.com/laravel/valet.git
synced 2026-02-04 16:10:08 +01:00
Change valet domain command to valet tld
Fixes #144 ".dev" is really a TLD, not a "domain" in the conventional sense. Changing the command to `valet tld` more accurately reflects the purpose of the command (to set or get the configured TLD served by Valet)
This commit is contained in:
@@ -120,7 +120,7 @@ function createDomainResolver($domain)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the domain used by DnsMasq.
|
||||
* Update the domain (TLD) used by DnsMasq.
|
||||
*
|
||||
* @param string $oldDomain
|
||||
* @param string $newDomain
|
||||
|
||||
@@ -130,9 +130,9 @@ function ($exitCode, $outputMessage) {
|
||||
*/
|
||||
function rewriteSecureNginxFiles()
|
||||
{
|
||||
$domain = $this->configuration->read()['domain'];
|
||||
$tld = $this->configuration->read()['tld'];
|
||||
|
||||
$this->site->resecureForNewDomain($domain, $domain);
|
||||
$this->site->resecureForNewTld($tld, $tld);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -136,13 +136,13 @@ function pruneLinks()
|
||||
}
|
||||
|
||||
/**
|
||||
* Resecure all currently secured sites with a fresh domain.
|
||||
* Resecure all currently secured sites with a fresh tld.
|
||||
*
|
||||
* @param string $oldDomain
|
||||
* @param string $domain
|
||||
* @param string $oldTld
|
||||
* @param string $tld
|
||||
* @return void
|
||||
*/
|
||||
function resecureForNewDomain($oldDomain, $domain)
|
||||
function resecureForNewTld($oldTld, $tld)
|
||||
{
|
||||
if (! $this->files->exists($this->certificatesPath())) {
|
||||
return;
|
||||
@@ -155,7 +155,7 @@ function resecureForNewDomain($oldDomain, $domain)
|
||||
}
|
||||
|
||||
foreach ($secured as $url) {
|
||||
$this->secure(str_replace('.'.$oldDomain, '.'.$domain, $url));
|
||||
$this->secure(str_replace('.'.$oldTld, '.'.$tld, $url));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user