@@ -96,129 +96,129 @@ describe('#compileCors()', () => {
96
96
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
97
97
. Resources . ApiGatewayMethodUsersCreateOptions
98
98
. Properties . Integration . IntegrationResponses [ 0 ]
99
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ]
99
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ] ,
100
100
) . to . equal ( '\'*,http://example.com\'' ) ;
101
101
102
102
expect (
103
103
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
104
104
. Resources . ApiGatewayMethodUsersCreateOptions
105
105
. Properties . Integration . IntegrationResponses [ 0 ]
106
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Headers' ]
106
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Headers' ] ,
107
107
) . to . equal ( '\'*\'' ) ;
108
108
109
109
expect (
110
110
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
111
111
. Resources . ApiGatewayMethodUsersCreateOptions
112
112
. Properties . Integration . IntegrationResponses [ 0 ]
113
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ]
113
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ] ,
114
114
) . to . equal ( '\'OPTIONS,POST\'' ) ;
115
115
116
116
expect (
117
117
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
118
118
. Resources . ApiGatewayMethodUsersCreateOptions
119
119
. Properties . Integration . IntegrationResponses [ 0 ]
120
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ]
120
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ] ,
121
121
) . to . equal ( '\'true\'' ) ;
122
122
123
123
expect (
124
124
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
125
125
. Resources . ApiGatewayMethodUsersCreateOptions
126
126
. Properties . Integration . IntegrationResponses [ 0 ]
127
- . ResponseParameters [ 'method.response.header.Access-Control-Max-Age' ]
127
+ . ResponseParameters [ 'method.response.header.Access-Control-Max-Age' ] ,
128
128
) . to . equal ( '\'86400\'' ) ;
129
129
130
130
// users/update
131
131
expect (
132
132
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
133
133
. Resources . ApiGatewayMethodUsersUpdateOptions
134
134
. Properties . Integration . IntegrationResponses [ 0 ]
135
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ]
135
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ] ,
136
136
) . to . equal ( '\'http://example.com\'' ) ;
137
137
138
138
expect (
139
139
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
140
140
. Resources . ApiGatewayMethodUsersUpdateOptions
141
141
. Properties . Integration . IntegrationResponses [ 0 ]
142
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ]
142
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ] ,
143
143
) . to . equal ( '\'OPTIONS,PUT\'' ) ;
144
144
145
145
expect (
146
146
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
147
147
. Resources . ApiGatewayMethodUsersUpdateOptions
148
148
. Properties . Integration . IntegrationResponses [ 0 ]
149
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ]
149
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ] ,
150
150
) . to . equal ( '\'false\'' ) ;
151
151
152
152
expect (
153
153
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
154
154
. Resources . ApiGatewayMethodUsersUpdateOptions
155
155
. Properties . Integration . IntegrationResponses [ 0 ]
156
- . ResponseParameters [ 'method.response.header.Access-Control-Max-Age' ]
156
+ . ResponseParameters [ 'method.response.header.Access-Control-Max-Age' ] ,
157
157
) . to . equal ( '\'86400\'' ) ;
158
158
159
159
// users/delete
160
160
expect (
161
161
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
162
162
. Resources . ApiGatewayMethodUsersDeleteOptions
163
163
. Properties . Integration . IntegrationResponses [ 0 ]
164
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ]
164
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ] ,
165
165
) . to . equal ( '\'*\'' ) ;
166
166
167
167
expect (
168
168
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
169
169
. Resources . ApiGatewayMethodUsersDeleteOptions
170
170
. Properties . Integration . IntegrationResponses [ 0 ]
171
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Headers' ]
171
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Headers' ] ,
172
172
) . to . equal ( '\'CustomHeaderA,CustomHeaderB\'' ) ;
173
173
174
174
expect (
175
175
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
176
176
. Resources . ApiGatewayMethodUsersDeleteOptions
177
177
. Properties . Integration . IntegrationResponses [ 0 ]
178
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ]
178
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ] ,
179
179
) . to . equal ( '\'OPTIONS,DELETE\'' ) ;
180
180
181
181
expect (
182
182
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
183
183
. Resources . ApiGatewayMethodUsersDeleteOptions
184
184
. Properties . Integration . IntegrationResponses [ 0 ]
185
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ]
185
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ] ,
186
186
) . to . equal ( '\'false\'' ) ;
187
187
188
188
expect (
189
189
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
190
190
. Resources . ApiGatewayMethodUsersDeleteOptions
191
191
. Properties . Integration . IntegrationResponses [ 0 ]
192
- . ResponseParameters [ 'method.response.header.Access-Control-Max-Age' ]
192
+ . ResponseParameters [ 'method.response.header.Access-Control-Max-Age' ] ,
193
193
) . to . equal ( '\'86400\'' ) ;
194
194
195
195
// users/any
196
196
expect (
197
197
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
198
198
. Resources . ApiGatewayMethodUsersAnyOptions
199
199
. Properties . Integration . IntegrationResponses [ 0 ]
200
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ]
200
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Origin' ] ,
201
201
) . to . equal ( '\'http://example.com\'' ) ;
202
202
203
203
expect (
204
204
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
205
205
. Resources . ApiGatewayMethodUsersAnyOptions
206
206
. Properties . Integration . IntegrationResponses [ 0 ]
207
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Headers' ]
207
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Headers' ] ,
208
208
) . to . equal ( '\'*\'' ) ;
209
209
210
210
expect (
211
211
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
212
212
. Resources . ApiGatewayMethodUsersAnyOptions
213
213
. Properties . Integration . IntegrationResponses [ 0 ]
214
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ]
214
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Methods' ] ,
215
215
) . to . equal ( '\'OPTIONS,DELETE,GET,HEAD,PATCH,POST,PUT\'' ) ;
216
216
217
217
expect (
218
218
awsCompileApigEvents . serverless . service . provider . compiledCloudFormationTemplate
219
219
. Resources . ApiGatewayMethodUsersAnyOptions
220
220
. Properties . Integration . IntegrationResponses [ 0 ]
221
- . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ]
221
+ . ResponseParameters [ 'method.response.header.Access-Control-Allow-Credentials' ] ,
222
222
) . to . equal ( '\'false\'' ) ;
223
223
} ) ;
224
224
} ) ;
0 commit comments