cookie-parser
Advanced tools
Comparing version 1.4.5 to 1.4.6
@@ -0,1 +1,6 @@ | ||
1.4.6 / 2021-11-16 | ||
================== | ||
* deps: cookie@0.4.1 | ||
1.4.5 / 2020-03-14 | ||
@@ -2,0 +7,0 @@ ================== |
{ | ||
"name": "cookie-parser", | ||
"description": "Parse HTTP request cookies", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)", | ||
@@ -16,16 +16,16 @@ "contributors": [ | ||
"dependencies": { | ||
"cookie": "0.4.0", | ||
"cookie": "0.4.1", | ||
"cookie-signature": "1.0.6" | ||
}, | ||
"devDependencies": { | ||
"eslint": "6.8.0", | ||
"eslint-config-standard": "14.1.0", | ||
"eslint-plugin-import": "2.20.1", | ||
"eslint-plugin-markdown": "1.0.2", | ||
"eslint-plugin-node": "11.0.0", | ||
"eslint-plugin-promise": "4.2.1", | ||
"eslint-plugin-standard": "4.0.1", | ||
"istanbul": "0.4.5", | ||
"mocha": "7.1.0", | ||
"supertest": "4.0.2" | ||
"eslint": "7.32.0", | ||
"eslint-config-standard": "14.1.1", | ||
"eslint-plugin-import": "2.25.2", | ||
"eslint-plugin-markdown": "2.2.1", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-promise": "4.3.1", | ||
"eslint-plugin-standard": "4.1.0", | ||
"mocha": "9.1.3", | ||
"nyc": "15.1.0", | ||
"supertest": "6.1.6" | ||
}, | ||
@@ -41,7 +41,7 @@ "files": [ | ||
"scripts": { | ||
"lint": "eslint --plugin markdown --ext js,md .", | ||
"lint": "eslint .", | ||
"test": "mocha --reporter spec --bail --check-leaks test/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" | ||
"test-ci": "nyc --reporter=lcov --reporter=text npm test", | ||
"test-cov": "nyc --reporter=html --reporter=text npm test" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # cookie-parser | ||
[![NPM Downloads][npm-downloads-image]][npm-url] | ||
[![Build Status][travis-image]][travis-url] | ||
[![Build Status][ci-image]][ci-url] | ||
[![Test Coverage][coveralls-image]][coveralls-url] | ||
@@ -23,7 +23,3 @@ | ||
```js | ||
var express = require('express') | ||
var cookieParser = require('cookie-parser') | ||
var app = express() | ||
app.use(cookieParser()) | ||
``` | ||
@@ -33,2 +29,5 @@ | ||
Create a new cookie parser middleware function using the given `secret` and | ||
`options`. | ||
- `secret` a string or array used for signing cookies. This is optional and if | ||
@@ -38,6 +37,22 @@ not specified, will not parse signed cookies. If a string is provided, this | ||
unsign the cookie with each secret in order. | ||
- `options` an object that is passed to `cookie.parse` as the second option. Se | ||
- `options` an object that is passed to `cookie.parse` as the second option. See | ||
[cookie](https://www.npmjs.org/package/cookie) for more information. | ||
- `decode` a function to decode the value of the cookie | ||
The middleware will parse the `Cookie` header on the request and expose the | ||
cookie data as the property `req.cookies` and, if a `secret` was provided, as | ||
the property `req.signedCookies`. These properties are name value pairs of the | ||
cookie name to cookie value. | ||
When `secret` is provided, this module will unsign and validate any signed cookie | ||
values and move those name value pairs from `req.cookies` into `req.signedCookies`. | ||
A signed cookie is a cookie that has a value prefixed with `s:`. Signed cookies | ||
that fail signature validation will have the value `false` instead of the tampered | ||
value. | ||
In addition, this module supports special "JSON cookies". These are cookie where | ||
the value is prefixed with `j:`. When these values are encountered, the value will | ||
be exposed as the result of `JSON.parse`. If parsing fails, the original value will | ||
remain. | ||
### cookieParser.JSONCookie(str) | ||
@@ -98,4 +113,8 @@ | ||
### [MIT Licensed](LICENSE) | ||
## License | ||
[MIT](LICENSE) | ||
[ci-image]: https://badgen.net/github/checks/expressjs/cookie-parser/master?label=ci | ||
[ci-url]: https://github.com/expressjs/cookie-parser/actions?query=workflow%3Aci | ||
[coveralls-image]: https://badgen.net/coveralls/c/github/expressjs/cookie-parser/master | ||
@@ -106,3 +125,1 @@ [coveralls-url]: https://coveralls.io/r/expressjs/cookie-parser?branch=master | ||
[npm-version-image]: https://badgen.net/npm/v/cookie-parser | ||
[travis-image]: https://badgen.net/travis/expressjs/cookie-parser/master | ||
[travis-url]: https://travis-ci.org/expressjs/cookie-parser |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12055
120
1
+ Addedcookie@0.4.1(transitive)
- Removedcookie@0.4.0(transitive)
Updatedcookie@0.4.1