mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 12:14:28 +00:00
fix(api): enforce destination access and cleanup networks
Require admin team membership for destination mutations, return invalid-token responses for tokenless requests, and remove standalone Docker networks when deleting destinations.
This commit is contained in:
1 parent
9665aa292c
commit
9e021c4037
3 files changed
+162
-55
No files matched your search
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Actions\Destination;
|
||||
|
||||
use App\Models\StandaloneDocker;
|
||||
|
||||
class RemoveStandaloneDockerNetwork
|
||||
{
|
||||
public function handle(StandaloneDocker $destination): void
|
||||
{
|
||||
$safeNetwork = escapeshellarg($destination->network);
|
||||
|
||||
instant_remote_process(["docker network disconnect {$safeNetwork} coolify-proxy"], $destination->server, throwError: false);
|
||||
instant_remote_process(["docker network rm -f {$safeNetwork}"], $destination->server);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user