import { Construct } from "aws-cdk-lib"; import { Distribution } from "aws-cdk-lib/lib/aws-cloudfront"; import { IBucket } from "aws-cdk-lib/lib/aws-s3"; import { ISource } from "aws-cdk-lib/lib/aws-s3-deployment"; import { Routing } from "../routing"; import { HttpHeaderOptions } from "./http-headers"; export interface ClientOptions { /** * The source code to distribute */ source: ISource; /** * Additional HTTP headers to use for the website * * Jelly uses Lambda@Edge to add the security headers. * These are largely follow best practices, but it is highly * recommended to customize the Content Security Policy, * or else you're going to have a hard time. * * @default - Defaults defined in HttpHeadersProps */ httpHeaders?: HttpHeaderOptions; /** * Whether to serve the website as a SPA * * If true, 404 error responses will return "/index.html" and a 200 response code * * @default true */ isSPA?: boolean; } export interface CdnProps extends ClientOptions { /** * Routing to use for custom domains * * If present, the Distribution will be aliased to the app domain name * * @default - The Distribution will not use a custom domain name */ routing?: Routing; } /** * A Construct to create and deploy the application's CDN */ export declare class Cdn extends Construct { readonly distributionBucket: IBucket; readonly distribution: Distribution; constructor(scope: Construct, props: CdnProps); private renderDomainNames; private renderEdgeLambdas; private renderResponseBehavior; }