mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-12 10:52:47 +00:00
updated bunch of file paths and changed the way posts are loaded
This commit is contained in:
9
node_modules/cookie-parser/README.md
generated
vendored
9
node_modules/cookie-parser/README.md
generated
vendored
@@ -2,6 +2,7 @@
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
@@ -27,7 +28,7 @@ app.use(cookieParser())
|
||||
|
||||
### cookieParser(secret, options)
|
||||
|
||||
- `secret` a string used for signing cookies. This is optional and if not specified, will not parse signed cookies.
|
||||
- `secret` a string or array used for signing cookies. This is optional and if not specified, will not parse signed cookies. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
|
||||
- `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
|
||||
|
||||
@@ -43,10 +44,14 @@ Given an object, this will iterate over the keys and call `JSONCookie` on each v
|
||||
|
||||
Parse a cookie value as a signed cookie. This will return the parsed unsigned value if it was a signed cookie and the signature was valid, otherwise it will return the passed value.
|
||||
|
||||
The `secret` argument can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
|
||||
|
||||
### cookieParser.signedCookies(cookies, secret)
|
||||
|
||||
Given an object, this will iterate over the keys and check if any value is a signed cookie. If it is a signed cookie and the signature is valid, the key will be deleted from the object and added to the new object that is returned.
|
||||
|
||||
The `secret` argument can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
@@ -70,6 +75,8 @@ app.listen(8080)
|
||||
|
||||
[npm-image]: https://img.shields.io/npm/v/cookie-parser.svg
|
||||
[npm-url]: https://npmjs.org/package/cookie-parser
|
||||
[node-version-image]: https://img.shields.io/node/v/cookie-parser.svg
|
||||
[node-version-url]: http://nodejs.org/download/
|
||||
[travis-image]: https://img.shields.io/travis/expressjs/cookie-parser/master.svg
|
||||
[travis-url]: https://travis-ci.org/expressjs/cookie-parser
|
||||
[coveralls-image]: https://img.shields.io/coveralls/expressjs/cookie-parser/master.svg
|
||||
|
||||
Reference in New Issue
Block a user