[cookie-session] Add missing sameSite type. name value is optional (defaults to session). (#28624)

This commit is contained in:
Ben Hodgson 2018-09-11 03:26:50 +01:00 committed by Ryan Cavanaugh
parent b5a595ff4f
commit 664bd2ccfa

View File

@ -15,7 +15,7 @@ declare namespace CookieSessionInterfaces {
/**
* The name of the cookie to set, defaults to session.
*/
name: string;
name?: string;
/**
* The list of keys to use to sign & verify cookie values. Set cookies are always signed with keys[0], while the other keys are valid for verification, allowing for key rotation.
@ -47,6 +47,11 @@ declare namespace CookieSessionInterfaces {
*/
domain?: string;
/**
* a boolean or string indicating whether the cookie is a "same site" cookie (false by default). This can be set to 'strict', 'lax', or true (which maps to 'strict').
*/
sameSite?: "strict" | "lax" | boolean;
/**
* a boolean indicating whether the cookie is only to be sent over HTTPS (false by default for HTTP, true by default for HTTPS).
*/