@@ -8,6 +8,7 @@ const validate = require('./apiGateway/validate')
8
8
const methods = require ( './apiGateway/methods' )
9
9
const compileRestApi = require ( 'serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/restApi' )
10
10
const compileResources = require ( 'serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/resources' )
11
+ const compileCors = require ( 'serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/cors' )
11
12
const compileDeployment = require ( 'serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/deployment' )
12
13
const getStackInfo = require ( 'serverless/lib/plugins/aws/info/getStackInfo' )
13
14
// Kinesis
@@ -29,12 +30,14 @@ class ServerlessApigatewayServiceProxy {
29
30
this . service = this . serverless . service . service
30
31
this . region = this . provider . getRegion ( )
31
32
this . stage = this . provider . getStage ( )
33
+ this . apiGatewayMethodLogicalIds = [ ]
32
34
Object . assign (
33
35
this ,
34
36
compileRestApi ,
35
37
compileResources ,
36
38
compileMethodsToKinesis ,
37
39
compileIamRoleToKinesis ,
40
+ compileCors ,
38
41
compileDeployment ,
39
42
validateKinesisServiceProxy ,
40
43
compileKinesisServiceProxy ,
@@ -53,13 +56,13 @@ class ServerlessApigatewayServiceProxy {
53
56
this . validated = await this . validateServiceProxies ( )
54
57
await this . compileRestApi ( )
55
58
await this . compileResources ( )
59
+ await this . compileCors ( )
56
60
57
61
//Kinesis proxy
58
62
await this . compileKinesisServiceProxy ( )
59
63
60
64
// SQS getProxy
61
65
await this . compileSqsServiceProxy ( )
62
-
63
66
if ( await this . existsDeployment ( ) ) {
64
67
await this . compileDeployment ( )
65
68
}
0 commit comments