(limiter?: AuthFailureLimiter)
| 35 | } |
| 36 | |
| 37 | function 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 | |
| 44 | function badToken(ip: string): { method: 'GET'; url: string; headers: Record<string, string> } { |
| 45 | return { |
no test coverage detected