Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charmander/strict-cookie-middleware
Node.js Connect/Express cookie-parsing middleware
https://github.com/charmander/strict-cookie-middleware
connect cookie expressjs middleware nodejs
Last synced: about 1 month ago
JSON representation
Node.js Connect/Express cookie-parsing middleware
- Host: GitHub
- URL: https://github.com/charmander/strict-cookie-middleware
- Owner: charmander
- License: isc
- Created: 2018-04-28T04:13:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-09T20:50:37.000Z (about 5 years ago)
- Last Synced: 2024-11-17T04:06:34.676Z (about 1 month ago)
- Topics: connect, cookie, expressjs, middleware, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/strict-cookie-middleware
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Strictly cookie-header-parsing middleware. For [Connect][] (Express) applications.
## Usage
```javascript
const strictCookieMiddleware = require('strict-cookie-middleware');app.use(strictCookieMiddleware);
``````javascript
const token = req.cookies.get('t');
```## API
- `request.cookies`
A [Map][] of cookies attached to the request. Empty if the cookie header is invalid.
[Connect]: https://github.com/senchalabs/connect
[Map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map