mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-26 16:49:08 +02:00
[client] Move the MDM precedence into ResolveUploadURL
Three of the four bundle paths ordered the destinations themselves, each with its own copy of "MDM first, then what was asked for". Give the resolver the MDM value as its first argument so the order lives in one place and a call site cannot express a different one. Pure refactor: the daemon passes "" for now, matching what it does today, and the remote job and both mobile SDKs resolve exactly as before.
This commit is contained in:
@@ -49,7 +49,7 @@ func (s *Server) DebugBundle(callerCtx context.Context, req *proto.DebugBundleRe
|
||||
// it is the operator of this deployment naming their own upload service, and
|
||||
// the peer already trusts that server for its whole configuration. Only a
|
||||
// URL the local caller named goes through requirePrivilegeForUploadURL above.
|
||||
uploadURL := debug.ResolveUploadURL(req.GetUploadURL(), publishedUploadURL)
|
||||
uploadURL := debug.ResolveUploadURL("", req.GetUploadURL(), publishedUploadURL)
|
||||
|
||||
// The upload runs without s.mutex held: it does network I/O to a possibly
|
||||
// slow destination and must not block the other RPCs that take the lock. The
|
||||
|
||||
Reference in New Issue
Block a user