fix: agent permission erlaubt /api/v1/agent/register (BSD Agent braucht das zum Start)
This commit is contained in:
parent
97eefcde5d
commit
ebd8f1ebb8
@ -129,8 +129,10 @@ func hasAPIKeyPermission(key *db.APIKey, r *http.Request) bool {
|
||||
|
||||
switch perm {
|
||||
case "agent":
|
||||
// Nur Agent-Endpunkte: WS-Connect und Heartbeat
|
||||
return path == "/api/v1/agent/ws" || path == "/api/v1/agent/heartbeat"
|
||||
// Nur Agent-Endpunkte: Registrierung, WS-Connect, Heartbeat
|
||||
return path == "/api/v1/agent/ws" ||
|
||||
path == "/api/v1/agent/heartbeat" ||
|
||||
path == "/api/v1/agent/register"
|
||||
|
||||
case "read":
|
||||
// Nur GET-Requests, keine destruktiven Aktionen
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user