MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / buildApp

Function buildApp

packages/server/test/rate-limit.test.ts:37–42  ·  view source on GitHub ↗
(limiter?: AuthFailureLimiter)

Source from the content-addressed store, hash-verified

35}
36
37function buildApp(limiter?: AuthFailureLimiter): FastifyInstance {
38 const app = Fastify({ trustProxy: true });
39 app.addHook('onRequest', createAuthHook(fixedImpl(), { limiter }));
40 app.get('/api/v1/sessions', async () => ({ ok: true }));
41 return app;
42}
43
44function badToken(ip: string): { method: 'GET'; url: string; headers: Record<string, string> } {
45 return {

Callers 1

rate-limit.test.tsFile · 0.70

Calls 3

createAuthHookFunction · 0.90
fixedImplFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected