File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
packages/event-handler/tests/unit/rest/middleware Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ describe('CORS Middleware', () => {
126
126
it ( 'does not set CORS headers when preflight request method does not match allowed method' , async ( ) => {
127
127
// Prepare
128
128
const app = new Router ( ) ;
129
+ app . use (
130
+ cors ( {
131
+ allowMethods : [ 'POST' ] ,
132
+ } )
133
+ ) ;
129
134
130
135
// Act
131
136
const result = await app . resolve (
@@ -143,6 +148,11 @@ describe('CORS Middleware', () => {
143
148
it ( 'does not set CORS headers when preflight request header does not match allowed header' , async ( ) => {
144
149
// Prepare
145
150
const app = new Router ( ) ;
151
+ app . use (
152
+ cors ( {
153
+ allowHeaders : [ 'Content-Type' ] ,
154
+ } )
155
+ ) ;
146
156
147
157
// Act
148
158
const result = await app . resolve (
You can’t perform that action at this time.
0 commit comments