File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -372,6 +372,9 @@ export class BackendStack extends cdk.Stack {
372372 // Create the 'status' resource under ':id'
373373 const reportStatusResource = reportIdResource . addResource ( 'status' ) ;
374374
375+ // Create the 'process-file' resource under ':id'
376+ const processFileResource = reportIdResource . addResource ( 'process-file' ) ;
377+
375378 // Define integration options once for reuse
376379 const integrationOptions = {
377380 connectionType : apigateway . ConnectionType . VPC_LINK ,
@@ -465,7 +468,7 @@ export class BackendStack extends cdk.Stack {
465468 } ) ;
466469
467470 // Add POST method to process file
468- reportIdResource . addMethod ( 'POST' , processFileIntegration , {
471+ processFileResource . addMethod ( 'POST' , processFileIntegration , {
469472 ...methodOptions ,
470473 requestParameters : {
471474 'method.request.path.id' : true ,
@@ -506,6 +509,10 @@ export class BackendStack extends cdk.Stack {
506509 ...corsOptions ,
507510 allowCredentials : false ,
508511 } ) ;
512+ processFileResource . addCorsPreflight ( {
513+ ...corsOptions ,
514+ allowCredentials : false ,
515+ } ) ;
509516
510517 // Configure Gateway Responses to add CORS headers to error responses
511518 const gatewayResponseTypes = [
You can’t perform that action at this time.
0 commit comments