Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix: save proxy configuration

Andras Bacsai301469de6bf2
diff --git a/app/Actions/Proxy/SaveConfiguration.php b/app/Actions/Proxy/SaveConfiguration.php
index 85aebf6197..edf4f3434e 100644
--- a/app/Actions/Proxy/SaveConfiguration.php
+++ b/app/Actions/Proxy/SaveConfiguration.php
@@ -10,9 +10,11 @@ class SaveConfiguration
{
use AsAction;
- public function handle(Server $server)
+ public function handle(Server $server, ?string $proxy_settings = null)
{
- $proxy_settings = CheckConfiguration::run($server, true);
+ if (is_null($proxy_settings)) {
+ $proxy_settings = CheckConfiguration::run($server, true);
+ }
$proxy_path = get_proxy_path();
$docker_compose_yml_base64 = base64_encode($proxy_settings);
diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php
index 560bdd784c..e4dd310ebc 100644
--- a/app/Http/Livewire/Server/Proxy.php
+++ b/app/Http/Livewire/Server/Proxy.php
@@ -47,7 +47,7 @@ class Proxy extends Component
public function submit()
{
try {
- SaveConfiguration::run($this->server);
+ SaveConfiguration::run($this->server, $this->proxy_settings);
$this->server->proxy->redirect_url = $this->redirect_url;
$this->server->save();
diff --git a/app/Http/Livewire/Server/Proxy/Deploy.php b/app/Http/Livewire/Server/Proxy/Deploy.php
index 506fd3b81a..790d9a251d 100644
--- a/app/Http/Livewire/Server/Proxy/Deploy.php
+++ b/app/Http/Livewire/Server/Proxy/Deploy.php
@@ -20,13 +20,6 @@ class Deploy extends Component
public function startProxy()
{
try {
- if (
- $this->server->proxy->last_applied_settings &&
- $this->server->proxy->last_saved_settings !== $this->server->proxy->last_applied_settings
- ) {
- SaveConfiguration::run($this->server);
- }
-
$activity = StartProxy::run($this->server);
$this->emit('newMonitorActivity', $activity->id);
} catch (\Throwable $e) {