Configuring CorsIntegration on OPTIONS method with options.origins: "*" or options.origins: CorsOrigins.ANY does not return Access-Control-Allow-Origin header in OPTIONS response.
Code example:
new openapix.Api(this, "TestAPI", {
source: testApiSource,
paths: {
"/test":
post: new openapix.LambdaIntegration(this, testFunction),
options: new CorsIntegration(this, {
headers: "'Content-Type,X-Amz-Date,Authorization'",
origins: "*",
methods: "'POST, OPTIONS'",
}),
},
},
});
Configuring CorsIntegration on OPTIONS method with options.origins: "*" or options.origins: CorsOrigins.ANY does not return
Access-Control-Allow-Origin
header in OPTIONS response.Code example: