lthn.io/app/Website/Pool/Boot.php
Claude 32d64561b2
fix: Octane compatibility — unconditional route registration
Octane registers routes once at startup when $_SERVER['HTTP_HOST']
is not available. All Website modules now register routes without
domain checks. Pool/Trade/Names subdomain routes disabled (views
not built). Home module disabled (Lethean handles homepage).

Container now serves 200 on FrankenPHP Octane.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 11:03:03 +01:00

43 lines
957 B
PHP

<?php
declare(strict_types=1);
namespace Website\Pool;
use Core\Events\DomainResolving;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
/**
* Mining pool — pool.lthn.io.
* Views not yet built — routes disabled until pool UI is created.
*/
class Boot extends ServiceProvider
{
public static array $domains = [
'/^pool\.lthn\.io$/',
];
public static array $listens = [
DomainResolving::class => 'onDomain',
];
public function register(): void {}
public function boot(): void
{
foreach (static::$listens as $event => $method) {
Event::listen($event, [$this, $method]);
}
}
public function onDomain(DomainResolving $event): void
{
foreach (static::$domains as $pattern) {
if (preg_match($pattern, $event->domain)) {
$event->resolve($this);
return;
}
}
}
}