mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 16:17:10 +00:00
fix(api): secure proxy config, clone volumes, and rollback tags (#11003)
This commit is contained in:
1 parent
16972f6483
commit
e560bdf9e0
43 files changed
+16229
-29
No files matched your search
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Api\ApplicationsController;
|
||||
|
||||
function currentRollbackImageTag(string $imageReference): ?string
|
||||
{
|
||||
$method = new ReflectionMethod(ApplicationsController::class, 'currentRollbackImageTag');
|
||||
$method->setAccessible(true);
|
||||
|
||||
return $method->invoke(null, $imageReference);
|
||||
}
|
||||
|
||||
it('extracts the current rollback image tag when the registry includes a port', function () {
|
||||
expect(currentRollbackImageTag('registry.example.com:5000/team/application:commit-sha'))
|
||||
->toBe('commit-sha');
|
||||
});
|
||||
|
||||
it('does not treat a digest as the current rollback image tag', function () {
|
||||
expect(currentRollbackImageTag('registry.example.com:5000/team/application@sha256:'.str_repeat('a', 64)))
|
||||
->toBeNull();
|
||||
});
|
||||
Reference in new issue
Block a user