import type { IncomingMessage } from "node:http"; /** * Browser-CSRF guard. Rejects a request carrying a foreign browser `Origin`. * * CDP / Playwright / MCP clients do not send `Origin` (they are non-browser * sockets), so an absent header is allowed and that path stays auth-only. When * `Origin` is present it must match the request's own host or appear in the * `BG_ALLOWED_ORIGINS` allowlist. */ export declare function isOriginAllowed(req: IncomingMessage, allowedOrigins: Set): boolean; /** * DNS-rebinding guard. A rebound name resolves to loopback but keeps the * attacker's hostname in `Host`, so a loopback-only listener is not enough. * Accepts loopback hostnames plus anything in `BG_ALLOWED_HOSTS`. */ export declare function isHostAllowed(req: IncomingMessage, allowedHosts: Set): boolean; /** Parse `BG_ALLOWED_HOSTS` (comma-separated hostnames). */ export declare function parseAllowedHosts(value: string | undefined): Set; //# sourceMappingURL=origin.d.ts.map