Closed drmikecrowe closed 1 year ago
Thanks! What's the problem you run into?
I'm seeing stuff like this:
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
20 | async (event: APIGatewayEvent, context: Context): Promise<APIGatewayProxyResult> => {
21 | logger('Running handler')
> 22 | const response = await handler(event, context)
| ^
23 | logger('Response received')
24 | if (response === undefined) {
25 | logger('Undefined response, returning statusCode 204')
at node_modules/@lambda-middleware/cors/src/cors.ts:38:26
The line with the error is the line that calls your handler, so the error might be related to the handler. Could you please share a small repo with the error with the full context including a handler? Thanks! :)
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Is your feature request related to a problem? Please describe. I'm trying to add the
cors
middleware to a compose chain, and can't seem to find the right combination. Here's my current attempt:Would you be willing to help with a PR?
Describe the solution you'd like
Ideally, I'd like to add
cors
to this chain to add to all lambda functionsDescribe alternatives you've considered
None
Additional context
Add any other context or screenshots about the feature request here.