lthn.io/app/Mod/Proxy/Boot.php
Claude d1873dbe09
feat: migrate all API routes to ApiRoutesRegistering
All 6 Mod modules now register API routes via ApiRoutesRegistering
instead of WebRoutesRegistering with CSRF hacks. The api middleware
group (ThrottleRequests + SubstituteBindings, no CSRF/session)
handles everything natively. Website/Api module simplified to just
metrics and homepage. fireApiRoutes() added to Web Boot.

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

20 lines
421 B
PHP

<?php
declare(strict_types=1);
namespace Mod\Proxy;
use Core\Events\ApiRoutesRegistering;
use Illuminate\Support\Facades\Route;
class Boot
{
public static array $listens = [
ApiRoutesRegistering::class => 'onApiRoutes',
];
public function onApiRoutes(ApiRoutesRegistering $event): void
{
$event->routes(fn () => Route::prefix('v1/proxy')->group(__DIR__ . '/Routes/api.php'));
}
}