Files
coolify/app/Listeners/ProxyStartedNotification.php
Andras Bacsai ddcb14500d refactor(proxy-status): refactored how the proxy status is handled on the UI and on the backend
feat(cloudflare): improved cloudflare tunnel automated installation
2025-06-06 14:47:54 +02:00

25 lines
584 B
PHP

<?php
namespace App\Listeners;
use App\Events\ProxyStarted;
use App\Events\ProxyStatusChanged;
use App\Models\Server;
class ProxyStartedNotification
{
public Server $server;
public function __construct() {}
public function handle(ProxyStarted $event): void
{
$this->server = data_get($event, 'data');
$this->server->setupDefaultRedirect();
$this->server->setupDynamicProxyConfiguration();
$this->server->proxy->force_stop = false;
$this->server->save();
// ProxyStatusChanged::dispatch( $this->server->id);
}
}