From 7193505aea1aab4d9f54024134ae07739cb8f830 Mon Sep 17 00:00:00 2001 From: IvanM Date: Mon, 10 Dec 2018 23:45:45 +0300 Subject: [PATCH] docs: document cookie options in readme closes #178 --- README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e1e98c0..754a793 100644 --- a/README.md +++ b/README.md @@ -68,8 +68,16 @@ following keys: - `key` - the name of the cookie to use to store the token secret (defaults to `'_csrf'`). - `path` - the path of the cookie (defaults to `'/'`). - - any other [res.cookie](http://expressjs.com/4x/api.html#res.cookie) - option can be set. + - `signed` - indicates if the cookie should be signed (defaults to `false`). + - `secure` - marks the cookie to be used with HTTPS only (defaults to + `false`). + - `maxAge` - the number of seconds after which the cookie will expire + (defaults to session length). + - `httpOnly` - flags the cookie to be accessible only by the web server + (defaults to `false`). + - `sameSite` - sets the same site policy for the cookie (defaults to none). + - `domain` - sets the domain the cookie is valid on (defaults to current + domain). ##### ignoreMethods