MCPcopy Create free account
hub / github.com/agent-tower/core / buildCleanUrl

Function buildCleanUrl

packages/server/src/middleware/tunnel-auth.ts:33–37  ·  view source on GitHub ↗
(request: FastifyRequest)

Source from the content-addressed store, hash-verified

31}
32
33function buildCleanUrl(request: FastifyRequest): string {
34 const clean = new URL(request.url, 'http://localhost');
35 clean.searchParams.delete('token');
36 return `${clean.pathname}${clean.search}`;
37}
38
39/**
40 * Fastify onRequest 钩子:隧道请求必须携带有效 token

Callers 1

tunnelAuthHookFunction · 0.85

Calls 1

deleteMethod · 0.45

Tested by

no test coverage detected