fix: use POST for machine/nodes endpoint to prevent token URL leakage

This commit is contained in:
xboard
2026-04-17 01:59:42 +08:00
parent c5bcbc3299
commit 17823891a2
+1 -1
View File
@@ -316,7 +316,7 @@ func (c *Client) ResetETags() {
// GetMachineNodes fetches the list of active nodes bound to this machine. // GetMachineNodes fetches the list of active nodes bound to this machine.
func (c *Client) GetMachineNodes() (*MachineNodesResponse, error) { func (c *Client) GetMachineNodes() (*MachineNodesResponse, error) {
resp, err := c.doRequest("GET", "/api/v2/server/machine/nodes", nil, "") resp, err := c.doRequest("POST", "/api/v2/server/machine/nodes", nil, "")
if err != nil { if err != nil {
return nil, fmt.Errorf("get machine nodes: %w", err) return nil, fmt.Errorf("get machine nodes: %w", err)
} }