UNPKG

@nodeboot/http-server

Version:

Node-Boot http server package. It provides a simple way to create HTTP servers using Node.js, with support for routing, middleware, and request handling.

5 lines 393 B
import { CorsOptions, StaticOrigin } from "./cors.types"; import { IncomingMessage, ServerResponse } from "node:http"; export declare function isOriginAllowed(requestOrigin: string | undefined, allowedOrigin: StaticOrigin): boolean; export declare function applyCorsHeaders(req: IncomingMessage, res: ServerResponse, options?: CorsOptions): Promise<boolean>; //# sourceMappingURL=cors.d.ts.map