[express-session]: Allow secret to be an array

From [the readme](https://github.com/expressjs/session#secret):

> This is the secret used to sign the session ID cookie. This can be either a string for a single secret, or an array of multiple secrets. If an array of secrets is provided, only the first element will be used to sign the session ID cookie, while all the elements will be considered when verifying the signature in requests.
This commit is contained in:
Ryan Cannon
2018-01-29 15:58:17 +00:00
committed by GitHub
parent 1254d58f4a
commit 861aeb58a5
+4 -2
View File
@@ -1,6 +1,8 @@
// Type definitions for express-session 1.15
// Project: https://www.npmjs.org/package/express-session
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>, Jacob Bogers <https://github.com/jacobbogers>
// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>
// Jacob Bogers <https://github.com/jacobbogers>
// Ryan Cannon <https://github.com/ry7n>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -51,7 +53,7 @@ declare function session(options?: session.SessionOptions): express.RequestHandl
declare namespace session {
interface SessionOptions {
secret: string;
secret: string | string[];
name?: string;
store?: Store | MemoryStore;
cookie?: express.CookieOptions;