MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / hasValidProxyToken

Function hasValidProxyToken

services/kiloclaw/controller/src/proxy.ts:33–40  ·  view source on GitHub ↗
(
  token: string | undefined,
  requireProxyToken: boolean,
  expectedToken: string
)

Source from the content-addressed store, hash-verified

31}
32
33function hasValidProxyToken(
34 token: string | undefined,
35 requireProxyToken: boolean,
36 expectedToken: string
37): boolean {
38 if (!requireProxyToken) return true;
39 return timingSafeTokenEqual(token, expectedToken);
40}
41
42function headersToOutgoing(headers: Headers): http.OutgoingHttpHeaders {
43 const out: http.OutgoingHttpHeaders = {};

Callers 2

createHttpProxyFunction · 0.85
handleWebSocketUpgradeFunction · 0.85

Calls 1

timingSafeTokenEqualFunction · 0.90

Tested by

no test coverage detected