From 9192914de4902d8b194dd001917547782fc2f8c8 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Thu, 7 May 2026 07:27:31 +0000 Subject: [PATCH] debug: /__coolify-check route to inspect runtime config --- routes/web.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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()) {