mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-29 20:19:56 +00:00
fix(grpc/proxy): persist Private capability on proxy registration
When a proxy connects with capabilities, the registerProxyConnection path constructs a *proxy.Capabilities literal but only copies three of the four fields (SupportsCustomPorts, RequireSubdomain, SupportsCrowdsec) — Private is silently dropped. Effect: the DB's proxies.private column stays NULL for every connection, GetClusterSupportsPrivate sees no proxy reported the capability and returns nil, and the cluster API response strips "private" via openapi omitempty. The dashboard then can't tell a private cluster apart from a centralised one. Add the missing field to the struct literal. No schema change — the Capabilities.Private column already exists (gorm:"embedded"); only the write path was broken. After redeploy + a proxy reconnect, /api/reverse-proxies/clusters now returns "private": true for clusters where an embedded `netbird proxy` is connected.
This commit is contained in:
@@ -351,6 +351,7 @@ func (s *ProxyServiceServer) registerProxyConnection(ctx context.Context, params
|
||||
SupportsCustomPorts: c.SupportsCustomPorts,
|
||||
RequireSubdomain: c.RequireSubdomain,
|
||||
SupportsCrowdsec: c.SupportsCrowdsec,
|
||||
Private: c.Private,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user