Push client identities to newt

This commit is contained in:
Owen
2026-10-12 17:03:27 -04:00
parent b43709903d
commit c6b1e5311e
8 changed files with 474 additions and 10 deletions
+15
View File
@@ -34,3 +34,18 @@ export function supportsCertReferences(
return false;
}
}
// Whether this newt client understands newt/wg/client-identities/add, used to
// set Remote-* headers on requests through its HTTP proxy. Bump the version
// floor here to match whatever release first ships the newt-side support.
export function supportsClientIdentities(
clientVersion: string | null | undefined
): boolean {
try {
if (!clientVersion) return false;
if (!semver.valid(clientVersion)) return false;
return semver.gte(clientVersion, "1.19.0");
} catch {
return false;
}
}