(ip: string)
| 42 | } |
| 43 | |
| 44 | function badToken(ip: string): { method: 'GET'; url: string; headers: Record<string, string> } { |
| 45 | return { |
| 46 | method: 'GET', |
| 47 | url: '/api/v1/sessions', |
| 48 | headers: { 'x-forwarded-for': ip, authorization: 'Bearer wrong-token' }, |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | describe('createAuthHook rate limiting (M6.4)', () => { |
| 53 | let app: FastifyInstance; |