middy-aws-cookie-parser
v0.0.1
Published
A middy middleware to parse cookies on AWS
Downloads
859
Readme
Usage
import type { APIGatewayEventWithCookie } from 'middy-cookie-parser'
import middy from '@middy/core'
import CookieParser from 'middy-aws-cookie-parser'
async function baseHandler(event: Partial<APIGatewayEventWithCookie>) {
return {
statusCode: 200,
body: JSON.stringify(event.cookies)
}
}
const handler = middy(baseHandler)
.use(CookieParser())