fix(gateway): preserve device identity for empty but present auth objects ({})

This commit is contained in:
administrator 2026-03-17 04:10:01 -07:00
parent 009a10bce2
commit 8988768e62

View File

@ -47,7 +47,7 @@ export async function probeGateway(opts: {
const hostname = new URL(opts.url).hostname;
// Local authenticated probes should stay device-bound so read/detail RPCs
// are not scope-limited by the shared-auth scope stripping hardening.
return isLoopbackHost(hostname) && !(opts.auth?.token || opts.auth?.password);
return isLoopbackHost(hostname) && opts.auth === undefined // Preserves device identity for empty but present auth objects (e.g. {});
} catch {
return false;
}