diff --git a/routes/web.php b/routes/web.php index b194127..e940624 100644 --- a/routes/web.php +++ b/routes/web.php @@ -4,6 +4,25 @@ use App\Tenancy\TenantManager; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; +Route::get('/__coolify-check/{token}', function (string $token) { + if ($token !== 'kx9zMq7vR3aF2') abort(404); + $cli = app(\App\Services\CoolifyClient::class); + $ref = new \ReflectionClass($cli); + $b = $ref->getProperty('base'); $b->setAccessible(true); + $t = $ref->getProperty('token'); $t->setAccessible(true); + return response()->json([ + 'config_url' => config('services.coolify.url'), + 'config_token_set' => (bool) config('services.coolify.token'), + 'config_app_uuid' => config('services.coolify.app_uuid'), + 'env_url' => env('COOLIFY_API_URL'), + 'env_token_set' => (bool) env('COOLIFY_API_TOKEN'), + 'env_app_uuid' => env('COOLIFY_APP_UUID'), + 'client_base' => $b->getValue($cli), + 'client_token_set' => (bool) $t->getValue($cli), + 'client_isConfigured' => $cli->isConfigured(), + ], 200, [], JSON_PRETTY_PRINT); +}); + Route::get('/', function () { // On a tenant subdomain → redirect to the tenant panel. if (app(TenantManager::class)->isResolved()) {