fix: always start proxy if not NONE is selected

This commit is contained in:
Andras Bacsai
2023-10-17 15:40:47 +02:00
parent be7f2ad9c4
commit 59c5b22e6c

View File

@@ -193,23 +193,24 @@ class Server extends BaseModel
} }
public function isProxyShouldRun() public function isProxyShouldRun()
{ {
$shouldRun = false;
if ($this->proxyType() === ProxyTypes::NONE->value) { if ($this->proxyType() === ProxyTypes::NONE->value) {
return false; return false;
} }
foreach ($this->applications() as $application) { // foreach ($this->applications() as $application) {
if (data_get($application, 'fqdn')) { // if (data_get($application, 'fqdn')) {
$shouldRun = true; // $shouldRun = true;
break; // break;
} // }
} // }
if ($this->id === 0) { // ray($this->services()->get());
$settings = InstanceSettings::get();
if (data_get($settings, 'fqdn')) { // if ($this->id === 0) {
$shouldRun = true; // $settings = InstanceSettings::get();
} // if (data_get($settings, 'fqdn')) {
} // $shouldRun = true;
return $shouldRun; // }
// }
return true;
} }
public function isFunctional() public function isFunctional()
{ {