Skip to content

Commit 7fdcdd3

Browse files
🚚 Use insecure instead of unsecure.
1 parent b64b9bd commit 7fdcdd3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

cli/Valet/Site.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,10 @@ function unsecureAll()
710710
*
711711
* @param string $url The domain name to serve
712712
* @param string $host The URL to proxy to, eg: http://127.0.0.1:8080
713-
* @param bool $unsecure
713+
* @param bool $insecure
714714
* @return string
715715
*/
716-
function proxyCreate($url, $host, $unsecure = false)
716+
function proxyCreate($url, $host, $insecure = false)
717717
{
718718
if (!preg_match('~^https?://.*$~', $host)) {
719719
throw new \InvalidArgumentException(sprintf('"%s" is not a valid URL', $host));
@@ -726,7 +726,7 @@ function proxyCreate($url, $host, $unsecure = false)
726726

727727
$siteConf = $this->replaceOldLoopbackWithNew(
728728
$this->files->get(
729-
$unsecure ? __DIR__.'/../stubs/proxy.valet.conf' : __DIR__.'/../stubs/secure.proxy.valet.conf'
729+
$insecure ? __DIR__.'/../stubs/insecure.proxy.valet.conf' : __DIR__.'/../stubs/secure.proxy.valet.conf'
730730
),
731731
'VALET_LOOPBACK',
732732
$this->valetLoopback()
@@ -738,13 +738,13 @@ function proxyCreate($url, $host, $unsecure = false)
738738
$siteConf
739739
);
740740

741-
if ($unsecure) {
742-
$this->put($url, $siteConf);
741+
if ($insecure) {
742+
$this->putInsecurely($url, $siteConf);
743743
} else {
744744
$this->secure($url, $siteConf);
745745
}
746746

747-
$protocol = $unsecure ? 'http' : 'https';
747+
$protocol = $insecure ? 'http' : 'https';
748748

749749
info('Valet will now proxy ['.$protocol.'://'.$url.'] traffic to ['.$host.'].');
750750
}
@@ -775,7 +775,7 @@ function proxyDelete($url)
775775
* @param string $siteConf pregenerated Nginx config file contents
776776
* @return void
777777
*/
778-
function put($url, $siteConf)
778+
function putInsecurely($url, $siteConf)
779779
{
780780
$this->unsecure($url);
781781

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# valet stub: proxy.valet.conf
1+
# valet stub: insecure.proxy.valet.conf
22

33
server {
44
listen 127.0.0.1:80;

cli/valet.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,13 @@
210210
/**
211211
* Create an Nginx proxy config for the specified domain
212212
*/
213-
$app->command('proxy domain host [--unsecure]', function ($domain, $host, $unsecure) {
213+
$app->command('proxy domain host [--insecure]', function ($domain, $host, $insecure) {
214214

215-
Site::proxyCreate($domain, $host, $unsecure);
215+
Site::proxyCreate($domain, $host, $insecure);
216216
Nginx::restart();
217217

218218
})->descriptions('Create an Nginx proxy site for the specified host. Useful for docker, mailhog etc.', [
219-
'--unsecure' => 'Create a proxy without SSL'
219+
'--insecure' => 'Create a proxy without SSL'
220220
]);
221221

222222
/**

0 commit comments

Comments
 (0)