import type { RequestHandler } from 'express'; export interface CorsOptions { /** * Allowed origin(s). Pass `'*'` to allow any (incompatible with `credentials: true`), * a single origin, an array, or a predicate. Defaults to `'*'`. */ origin?: '*' | string | string[] | ((origin: string | undefined) => boolean); /** Allow cookies / Authorization to be sent cross-origin. Default: false. */ credentials?: boolean; /** Methods echoed in `Access-Control-Allow-Methods`. */ methods?: string[]; /** Request headers echoed in `Access-Control-Allow-Headers`. */ headers?: string[]; /** Response headers exposed to the browser. */ exposedHeaders?: string[]; /** Preflight cache TTL in seconds. Default: 86400 (24h). */ maxAge?: number; } /** * Minimal CORS middleware. Covers the common needs (allow-list of origins, * credentials, preflight). For complex setups, use the `cors` npm package * via `mtbREST.app().use(cors())`. */ export declare function corsMiddleware(opts?: CorsOptions): RequestHandler; //# sourceMappingURL=cors.d.ts.map