import * as http from 'node:http'; /** * Set security headers to protect against common web vulnerabilities */ export declare function setSecurityHeaders(res: http.ServerResponse): void; export declare function setCorsHeaders(res: http.ServerResponse, allowedOrigin?: string, requestOrigin?: string): void; export declare function sendJson(res: http.ServerResponse, status: number, data: unknown): void; export declare function parseBody(req: http.IncomingMessage): Promise>; export declare function validateApiKey(provided: string | undefined, expected: string): boolean; export declare class RateLimiter { private requests; private maxRequests; private windowMs; private cleanupTimer; constructor(maxRequests?: number, windowMs?: number); isAllowed(key: string): boolean; getRemainingRequests(key: string): number; private cleanup; destroy(): void; } export declare function rateLimitMiddleware(limiter: RateLimiter, req: http.IncomingMessage, res: http.ServerResponse, whitelist?: string[]): boolean; //# sourceMappingURL=http.d.ts.map