mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 02:27:57 +00:00
Remove the version header from the health endpoint and use upgrade status polling to determine completion.
23 lines
731 B
PHP
23 lines
731 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\Api\OtherController;
|
|
use Illuminate\Http\Request;
|
|
|
|
it('does not expose the running version on the healthcheck response', function () {
|
|
config(['constants.coolify.version' => '4.3.1']);
|
|
|
|
$response = (new OtherController)->healthcheck(Request::create('/api/health', 'GET'));
|
|
|
|
expect($response->getContent())->toBe('OK')
|
|
->and($response->headers->has('X-Coolify-Version'))->toBeFalse();
|
|
});
|
|
|
|
it('does not expose the running Coolify version on the public health endpoint', function () {
|
|
config(['constants.coolify.version' => '4.3.1']);
|
|
|
|
$this->get('/api/health')
|
|
->assertSuccessful()
|
|
->assertSee('OK')
|
|
->assertHeaderMissing('X-Coolify-Version');
|
|
});
|