Avoid Portainer endpoint metadata lookup
This commit is contained in:
+7
-1
@@ -181,7 +181,13 @@ $realmError = null;
|
||||
if ($isAdmin && !$showInstances) {
|
||||
try {
|
||||
$configuredEndpointId = pnpaas_portainer_endpoint_id();
|
||||
$endpoints = [pnpaas_portainer_request('/api/endpoints/' . $configuredEndpointId)];
|
||||
// Die Endpoint-Metadaten sind für eingeschränkte Portainer-Benutzer nicht immer lesbar.
|
||||
// Die konfigurierte ID reicht aus; der eigentliche Zugriff erfolgt über den Docker-Proxy.
|
||||
$endpoints = [[
|
||||
'Id' => $configuredEndpointId,
|
||||
'Name' => 'Portainer-Umgebung ' . $configuredEndpointId,
|
||||
'Status' => 1,
|
||||
]];
|
||||
foreach ($endpoints as $endpoint) {
|
||||
$endpointId = (int)($endpoint['Id'] ?? 0);
|
||||
if ($endpointId < 1) continue;
|
||||
|
||||
Reference in New Issue
Block a user