From 664bd2ccfa2e3543c65deb8e754a06e1cbfb827c Mon Sep 17 00:00:00 2001 From: Ben Hodgson Date: Tue, 11 Sep 2018 03:26:50 +0100 Subject: [PATCH] [cookie-session] Add missing sameSite type. name value is optional (defaults to session). (#28624) --- types/cookie-session/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/types/cookie-session/index.d.ts b/types/cookie-session/index.d.ts index a0b7a2e6b0..af48860396 100644 --- a/types/cookie-session/index.d.ts +++ b/types/cookie-session/index.d.ts @@ -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). */