/** * CORS configuration builders. * * Generates CORS rules for S3 buckets to allow browser-based * presigned URL uploads. Without CORS, the browser will block * the cross-origin PUT request to the S3 endpoint. */ import type { CorsRule } from './types'; /** * Build the default CORS rules for presigned URL uploads. * * This allows: * - PUT: for presigned uploads from the browser * - GET: for presigned downloads and public file access * - HEAD: for cache headers and object existence checks * * @param allowedOrigins - Domains allowed to make cross-origin requests. * Use specific domains in production (e.g., ["https://app.example.com"]). * Never use ["*"] in production. * @param maxAgeSeconds - Preflight cache duration (default: 3600 = 1 hour) */ export declare function buildUploadCorsRules(allowedOrigins: string[], maxAgeSeconds?: number): CorsRule[]; /** * Build restrictive CORS rules for private-only buckets. * * Similar to upload CORS but without GET (private files use * presigned URLs which include auth in the query string, * so CORS is less of a concern for downloads). * * @param allowedOrigins - Domains allowed to make cross-origin requests. * @param maxAgeSeconds - Preflight cache duration (default: 3600 = 1 hour) */ export declare function buildPrivateCorsRules(allowedOrigins: string[], maxAgeSeconds?: number): CorsRule[];