import { IHttpServerComponent } from '@dcl/core-commons'; export declare const corsHeaders: { 'Access-Control-Allow-Origin': string; 'Access-Control-Allow-Methods': string; 'Access-Control-Max-Age': string; 'Access-Control-Expose-Headers': string; 'Access-Control-Allow-Headers': string; }; export declare function handleOptions(): Response; type CustomOrigin = (requestOrigin: string | undefined) => boolean; export interface CorsOptions { /** * @default '*'' */ origin?: boolean | string | (string | RegExp)[] | CustomOrigin; /** * @default 'GET,HEAD,PUT,PATCH,POST,DELETE' */ methods?: string[]; allowedHeaders?: string[]; exposedHeaders?: string[]; credentials?: boolean; maxAge?: number; /** * @default false */ preflightContinue?: boolean; /** * @default 204 */ optionsSuccessStatus?: number; } /** * Builds the CORS headers that apply to an actual (non-preflight) response for `request`. Returns * an empty `Headers` when the request carries no `Origin`, since there is nothing to add. Shared by * the CORS middleware and by paths that respond before the middleware runs (e.g. an early * body-size rejection), so cross-origin clients can still read those responses. */ export declare function getActualResponseCorsHeaders(options: CorsOptions, request: Request): Headers; export declare function createCorsMiddleware(options: CorsOptions): IHttpServerComponent.IRequestHandler; export {};