lthn.io/app/Mod/Pool/Boot.php
Claude d83c9094cd
refactor: move /v1/* API routes exclusively to Website/Api module
Production stack has honeypot that null-routes API payloads sent to
the web domain. API routes now only register via Website/Api module
(api.lthn.io). Mod modules stripped to web-only routes. Frontend JS
fetch calls use configurable API_URL for cross-origin API access.

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

29 lines
733 B
PHP

<?php
declare(strict_types=1);
namespace Mod\Pool;
use Core\Events\FrameworkBooted;
use Core\Events\WebRoutesRegistering;
use Illuminate\Support\Facades\Route;
use Mod\Pool\Services\PoolClient;
class Boot
{
public static array $listens = [
WebRoutesRegistering::class => 'onWebRoutes',
FrameworkBooted::class => 'onFrameworkBooted',
];
public function onWebRoutes(WebRoutesRegistering $event): void
{
$event->routes(fn () => Route::prefix('pool')->group(__DIR__ . '/Routes/web.php'));
}
public function onFrameworkBooted(FrameworkBooted $event): void
{
app()->singleton(PoolClient::class);
app('config')->set('pool', require __DIR__ . '/config.php');
}
}