Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"method.response.header.Access-Control-Max-Age": "'600'",
},
selectionPattern: '\\d{3}',
statusCode: '200',
},
],
passthroughBehavior: api.PassthroughBehavior.WHEN_NO_MATCH,
requestTemplates: {
"application/json": "{\"statusCode\": 200}"
},
})
const method = {
methodResponses: [
{
responseModels: {
"application/json": new api.EmptyModel(),
},
responseParameters: {
"method.response.header.Access-Control-Allow-Headers": true,
"method.response.header.Access-Control-Allow-Methods": true,
"method.response.header.Access-Control-Allow-Origin": true,
"method.response.header.Access-Control-Max-Age": true,
},
statusCode: '200',
},
],
}
endpoint.addMethod('OPTIONS', mock, method)
return endpoint
}