# yaml-language-server: $schema=../cdk.schema.json Parameters: ProxyUrl: Type: String Description: The url to proxy AllowedPattern: .*[^\/]$ ConstraintDescription: MUST NOT end in a forward slash ("/") Default: https://example.com Resources: ProxyApi: Type: aws-cdk-lib.aws_apigateway.RestApi Properties: restApiName: WebsiteProxy endpointConfiguration: types: - EDGE defaultIntegration: aws-cdk-lib.aws_apigateway.HttpIntegration: Ref: ProxyUrl ProxyResource: Type: aws-cdk-lib.aws_apigateway.ProxyResource Properties: parent: CDK::GetProp: ProxyApi.root anyMethod: true defaultIntegration: aws-cdk-lib.aws_apigateway.HttpIntegration: - Fn::Join: ['/', [Ref: ProxyUrl, '{proxy}']] - proxy: true httpMethod: GET options: requestParameters: integration.request.path.proxy: method.request.path.proxy defaultMethodOptions: requestParameters: method.request.path.proxy: true