/** * Route definitions for the proxy detection API */ import { FastifyInstance } from 'fastify'; import { healthHandler, mainHandler, randomHandler, allHandler, detailedDebugHandler } from './handlers'; /** * Register all routes with the Fastify instance */ export async function registerRoutes(fastify: FastifyInstance) { // Health check endpoint (bypasses authentication) fastify.get('/health', healthHandler); // Detailed debug endpoint (bypasses authentication) fastify.get('/ip-debug-detailed', detailedDebugHandler); // Random endpoint for testing fastify.get('/random', randomHandler); // All endpoint for testing fastify.get('/all', allHandler); // All endpoint for testing fastify.get('/clear', clearHandler); // Main detection endpoint - extracts all IPs from headers fastify.get('/', mainHandler); }