reogranized app and added more headers
This commit is contained in:
parent
1048ab5c20
commit
223f426a58
10 changed files with 925 additions and 218 deletions
28
src/routes.ts
Normal file
28
src/routes.ts
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* Route definitions for the proxy detection API
|
||||
*/
|
||||
|
||||
import { FastifyInstance } from 'fastify';
|
||||
import {
|
||||
healthHandler,
|
||||
mainHandler,
|
||||
randomHandler,
|
||||
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);
|
||||
|
||||
// Main detection endpoint - extracts all IPs from headers
|
||||
fastify.get('/', mainHandler);
|
||||
|
||||
// Random endpoint for testing
|
||||
fastify.get('/random', randomHandler);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue