From 64d00e4c05901b8c6214e9d4eab907667b8947d8 Mon Sep 17 00:00:00 2001 From: Horiuchi_H Date: Mon, 29 Aug 2016 12:45:06 +0900 Subject: [PATCH 1/2] feat: add secure: `auto` option --- express-serve-static-core/express-serve-static-core.d.ts | 8 ++++---- express-session/express-session-tests.ts | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/express-serve-static-core/express-serve-static-core.d.ts b/express-serve-static-core/express-serve-static-core.d.ts index 745b0e6ab2..36b2da6c65 100644 --- a/express-serve-static-core/express-serve-static-core.d.ts +++ b/express-serve-static-core/express-serve-static-core.d.ts @@ -121,7 +121,7 @@ declare module "express-serve-static-core" { httpOnly?: boolean; path?: string; domain?: string; - secure?: boolean; + secure?: boolean | 'auto'; } interface Errback { (err: Error): void; } @@ -199,7 +199,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted charset of the specified character sets, - * based on the request’s Accept-Charset HTTP header field. + * based on the request窶冱 Accept-Charset HTTP header field. * If none of the specified charsets is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -212,7 +212,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted encoding of the specified encodings, - * based on the request’s Accept-Encoding HTTP header field. + * based on the request窶冱 Accept-Encoding HTTP header field. * If none of the specified encodings is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -225,7 +225,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted language of the specified languages, - * based on the request’s Accept-Language HTTP header field. + * based on the request窶冱 Accept-Language HTTP header field. * If none of the specified languages is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. diff --git a/express-session/express-session-tests.ts b/express-session/express-session-tests.ts index 1e1f909b14..0b8460214f 100644 --- a/express-session/express-session-tests.ts +++ b/express-session/express-session-tests.ts @@ -6,7 +6,8 @@ import session = require('express-session'); var app = express(); app.use(session({ - secret: 'keyboard cat' + secret: 'keyboard cat', + cookie: { secure: 'auto' } })); app.use(session({ secret: 'keyboard cat', From ff4757f0c652ebcdc5b717bc7787fcc955aac2d5 Mon Sep 17 00:00:00 2001 From: Horiuchi_H Date: Mon, 29 Aug 2016 12:48:35 +0900 Subject: [PATCH 2/2] fix: character convert bug --- express-serve-static-core/express-serve-static-core.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/express-serve-static-core/express-serve-static-core.d.ts b/express-serve-static-core/express-serve-static-core.d.ts index 36b2da6c65..93551ffece 100644 --- a/express-serve-static-core/express-serve-static-core.d.ts +++ b/express-serve-static-core/express-serve-static-core.d.ts @@ -199,7 +199,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted charset of the specified character sets, - * based on the request窶冱 Accept-Charset HTTP header field. + * based on the request's Accept-Charset HTTP header field. * If none of the specified charsets is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -212,7 +212,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted encoding of the specified encodings, - * based on the request窶冱 Accept-Encoding HTTP header field. + * based on the request's Accept-Encoding HTTP header field. * If none of the specified encodings is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts. @@ -225,7 +225,7 @@ declare module "express-serve-static-core" { /** * Returns the first accepted language of the specified languages, - * based on the request窶冱 Accept-Language HTTP header field. + * based on the request's Accept-Language HTTP header field. * If none of the specified languages is accepted, returns false. * * For more information, or if you have issues or concerns, see accepts.