Skip to content

Commit 3f5e294

Browse files
committed
remove default value for secure option
1 parent fac3fcd commit 3f5e294

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "koa-session-minimal",
3-
"version": "3.0.2",
3+
"version": "3.0.3",
44
"description": "Minimal implementation of session middleware for Koa 2. Inspired by and compatible with koa-generic-session",
55
"main": "dist/session.js",
66
"scripts": {
@@ -39,8 +39,8 @@
3939
"babel-register": "^6.14.0",
4040
"chai": "^3.5.0",
4141
"eslint": "^3.4.0",
42-
"eslint-config-airbnb-base": "^8.0.0",
43-
"eslint-plugin-import": "^1.16.0",
42+
"eslint-config-airbnb-base": "^11.0.0",
43+
"eslint-plugin-import": "^2.2.0",
4444
"istanbul": "^0.4.5",
4545
"koa": "^2.0.0-alpha.7",
4646
"koa-generic-session-mongo": "^0.3.0",

src/session.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const cookieOpt = (cookie) => {
99
const options = Object.assign({
1010
maxAge: 0, // default to use session cookie
1111
path: '/',
12-
secure: false,
1312
httpOnly: true,
1413
}, cookie || {}, {
1514
overwrite: true, // overwrite previous session cookie changes
@@ -39,7 +38,7 @@ module.exports = (options) => {
3938
const store = new Store(opt.store || new MemoryStore())
4039
const cookie = opt.cookie instanceof Function ? opt.cookie : cookieOpt(opt.cookie)
4140

42-
return async (ctx, next) => { // eslint-disable-line arrow-parens
41+
return async (ctx, next) => {
4342
// initialize session id and data
4443
const cookieSid = ctx.cookies.get(key)
4544

test/store.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class AsyncStore {
2727
}
2828

2929
async get(sid) {
30-
return await this.store.get(sid)
30+
return this.store.get(sid)
3131
}
3232

3333
async set(sid, val, ttl) {

0 commit comments

Comments
 (0)