1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-07 01:00:09 +01:00

♻️ Refactoring proxy command. Proxy is not secured by default.

This commit is contained in:
Mikaël Popowicz
2021-04-30 14:31:55 +02:00
parent 7fdcdd3544
commit 01f4b582e6
4 changed files with 18 additions and 18 deletions

View File

@@ -353,7 +353,7 @@ public function test_add_proxy()
$site->assertCertificateNotExists('my-new-proxy.com.test');
$site->assertNginxNotExists('my-new-proxy.com.test');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443', true);
$site->assertCertificateExistsWithCounterValue('my-new-proxy.com.test', 0);
$site->assertNginxExists('my-new-proxy.com.test');
@@ -387,7 +387,7 @@ public function test_add_non_secure_proxy()
$site->assertCertificateNotExists('my-new-proxy.com.test');
$site->assertNginxNotExists('my-new-proxy.com.test');
$site->proxyCreate('my-new-proxy.com', 'http://127.0.0.1:9443', true);
$site->proxyCreate('my-new-proxy.com', 'http://127.0.0.1:9443', false);
$site->assertCertificateNotExists('my-new-proxy.com.test');
$site->assertNginxExists('my-new-proxy.com.test');
@@ -418,7 +418,7 @@ public function test_add_proxy_clears_previous_proxy_certificate()
$site->useOutput();
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:7443');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:7443', true);
$site->assertCertificateExistsWithCounterValue('my-new-proxy.com.test', 0);
@@ -432,7 +432,7 @@ public function test_add_proxy_clears_previous_proxy_certificate()
], $site->proxies()->all());
// Note: different proxy port
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443', true);
// This shows we created a new certificate.
$site->assertCertificateExistsWithCounterValue('my-new-proxy.com.test', 1);
@@ -470,7 +470,7 @@ public function test_add_proxy_clears_previous_non_proxy_certificate()
$site->assertCertificateExistsWithCounterValue('my-new-proxy.com.test', 0);
$site->assertNginxNotExists('my-new-proxy.com.test');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443', true);
// This shows we created a new certificate.
$site->assertCertificateExistsWithCounterValue('my-new-proxy.com.test', 1);
@@ -507,7 +507,7 @@ public function test_remove_proxy()
$this->assertEquals([], $site->proxies()->all());
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443');
$site->proxyCreate('my-new-proxy.com', 'https://127.0.0.1:9443', true);
$this->assertEquals([
'my-new-proxy.com' => [