tezx
Version:
TezX is a high-performance, lightweight JavaScript framework designed for speed, scalability, and flexibility. It enables efficient routing, middleware management, and static file serving with minimal configuration. Fully compatible with Node.js, Deno, an
11 lines (10 loc) • 414 B
TypeScript
import { ctx as Context } from "../types/index.js";
export type CorsOptions = {
origin?: string | RegExp | (string | RegExp)[] | ((reqOrigin: string) => boolean);
methods?: string[];
allowedHeaders?: string[];
exposedHeaders?: string[];
credentials?: boolean;
maxAge?: number;
};
export declare function cors(option?: CorsOptions): (ctx: Context, next: () => Promise<any>) => Promise<any>;