coolify/app/Listeners/ProxyStartedNotification.php

23 lines
491 B
PHP
Raw Normal View History

<?php
namespace App\Listeners;
use App\Events\ProxyStarted;
use App\Models\Server;
class ProxyStartedNotification
{
public Server $server;
2024-06-10 22:43:34 +02:00
2024-06-19 08:59:46 +02:00
public function __construct() {}
public function handle(ProxyStarted $event): void
{
2024-03-12 12:30:40 +01:00
$this->server = data_get($event, 'data');
$this->server->setupDefault404Redirect();
$this->server->setupDynamicProxyConfiguration();
$this->server->proxy->force_stop = false;
$this->server->save();
}
}