import type { BaseAppConfig } from '../app/config';
import type { HttpRequest } from './request';
import type { HttpResponse } from './response';
export declare const CorsHeaders: unique symbol;
export declare class HttpCorsOptions {
    hosts: (string | RegExp)[];
    paths?: (string | RegExp)[];
    methods?: string[];
    credentials?: boolean;
    allowHeaders?: string[];
    exposeHeaders?: string[];
}
export declare class HttpCorsOptionsMulti {
    readonly options: HttpCorsOptions[];
    constructor(options: HttpCorsOptions[]);
}
export type HttpCorsConfig<C extends BaseAppConfig = BaseAppConfig> = HttpCorsOptions | HttpCorsOptions[] | ((config: C) => HttpCorsOptions | HttpCorsOptions[]);
export declare class HttpCors {
    static getResponseHeaders(response: HttpResponse): Record<string, string> | undefined;
}
export declare function resolveCorsOptions<C extends BaseAppConfig>(config: C, cors?: HttpCorsConfig<C>): HttpCorsOptions[];
export declare function handleCorsPreflight(request: HttpRequest, response: HttpResponse, options: readonly HttpCorsOptions[]): boolean;
export declare function prepareCorsResponseHeaders(request: HttpRequest, response: HttpResponse, options: readonly HttpCorsOptions[]): Record<string, string> | undefined;
export declare function applyCorsResponseHeaders(request: HttpRequest, response: HttpResponse, options: readonly HttpCorsOptions[]): void;
//# sourceMappingURL=cors.d.ts.map