Files
pterodactyl-panel/app/Http/Controllers/Api/Application/Nodes/NodeConfigurationController.php
robert dennisandClaude Opus 4.8 f04d2f52f1 Require nodes write permission for node configuration endpoint
The configuration endpoint returns the node's decrypted daemon token, so gate it behind write access instead of read. The shared single-node view request keeps read access.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 19:17:36 -04:00

22 lines
768 B
PHP

<?php
namespace Pterodactyl\Http\Controllers\Api\Application\Nodes;
use Pterodactyl\Models\Node;
use Illuminate\Http\JsonResponse;
use Pterodactyl\Http\Controllers\Api\Application\ApplicationApiController;
use Pterodactyl\Http\Requests\Api\Application\Nodes\GetNodeConfigurationRequest;
class NodeConfigurationController extends ApplicationApiController
{
/**
* Returns the configuration information for a node. This allows for automated deployments
* to remote machines so long as an API key is provided to the machine to make the request
* with, and the node is known.
*/
public function __invoke(GetNodeConfigurationRequest $request, Node $node): JsonResponse
{
return new JsonResponse($node->getConfiguration());
}
}