Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wingleung/middy-aws-cookie-parser
A middy middleware to parse cookies on AWS
https://github.com/wingleung/middy-aws-cookie-parser
aws aws-lambda cookie lambda middleware middy
Last synced: 2 months ago
JSON representation
A middy middleware to parse cookies on AWS
- Host: GitHub
- URL: https://github.com/wingleung/middy-aws-cookie-parser
- Owner: wingleung
- License: mit
- Created: 2022-07-04T17:45:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-03T19:21:38.000Z (over 2 years ago)
- Last Synced: 2024-10-06T10:18:11.839Z (3 months ago)
- Topics: aws, aws-lambda, cookie, lambda, middleware, middy
- Language: TypeScript
- Homepage:
- Size: 148 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Middy AWS cookie parsing middleware
AWS cookie parsing middleware for the middy framework
Install
```shell
npm install middy-aws-cookie-parser --save
```Usage
```typescript
import type { APIGatewayEventWithCookie } from 'middy-cookie-parser'import middy from '@middy/core'
import CookieParser from 'middy-aws-cookie-parser'async function baseHandler(event: Partial) {
// event.cookies is available as a parsed cookie jar
return {
statusCode: 200,
body: JSON.stringify(
event.cookies
)
}
}const handler = middy(baseHandler)
.use(CookieParser())
```