/** * Host Header Validation Middleware * * Validates the HTTP Host header against a whitelist of allowed values * to protect against DNS rebinding attacks. Only active when explicitly * enabled via security.dnsRebindingProtection.enabled = true. */ import type { ServerRequest, ServerResponse } from '../../common'; /** * Configuration for host validation middleware. */ export interface HostValidationOptions { /** Whether host validation is enabled. @default false */ enabled: boolean; /** Allowed Host header values (e.g., ['localhost:3001', 'api.example.com']) */ allowedHosts?: string[]; /** Allowed Origin header values (e.g., ['https://app.example.com']) */ allowedOrigins?: string[]; } /** * Create middleware that validates Host and Origin headers. * Returns a no-op middleware when not enabled. */ export declare function createHostValidationMiddleware(options: HostValidationOptions): (req: ServerRequest, res: ServerResponse, next: () => void) => void; //# sourceMappingURL=host-validation.middleware.d.ts.map