@@ -466,16 +466,22 @@ export class BackendStack extends cdk.Stack {
466466 apigateway . ResponseType . INTEGRATION_TIMEOUT ,
467467 ] ;
468468
469- gatewayResponseTypes . forEach ( ( responseType ) => {
470- new apigateway . CfnGatewayResponse ( this , `${ appName } GatewayResponse${ responseType } -${ props . environment } ` , {
471- restApiId : api . restApiId ,
472- responseType : responseType . toString ( ) ,
473- responseParameters : {
474- 'gatewayresponse.header.Access-Control-Allow-Origin' : "'*'" ,
475- 'gatewayresponse.header.Access-Control-Allow-Headers' : "'Content-Type,Authorization,X-Amz-Date,X-Api-Key'" ,
476- 'gatewayresponse.header.Access-Control-Allow-Methods' : "'GET,POST,PUT,PATCH,DELETE,OPTIONS'"
469+ gatewayResponseTypes . forEach ( responseType => {
470+ new apigateway . CfnGatewayResponse (
471+ this ,
472+ `${ appName } GatewayResponse${ responseType } -${ props . environment } ` ,
473+ {
474+ restApiId : api . restApiId ,
475+ responseType : responseType . toString ( ) ,
476+ responseParameters : {
477+ 'gatewayresponse.header.Access-Control-Allow-Origin' : "'*'" ,
478+ 'gatewayresponse.header.Access-Control-Allow-Headers' :
479+ "'Content-Type,Authorization,X-Amz-Date,X-Api-Key'" ,
480+ 'gatewayresponse.header.Access-Control-Allow-Methods' :
481+ "'GET,POST,PUT,PATCH,DELETE,OPTIONS'" ,
482+ } ,
477483 } ,
478- } ) ;
484+ ) ;
479485 } ) ;
480486
481487 // Create API Gateway execution role with required permissions
0 commit comments