@@ -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
0 commit comments