...
|
...
|
@@ -41,15 +41,22 @@ app.use(bodyParser.json()); |
|
|
app.use(bodyParser.urlencoded({extended: false}));
|
|
|
app.use(cookieParser());
|
|
|
app.use(session({
|
|
|
proxy: true,
|
|
|
resave: false,
|
|
|
saveUninitialized: true,
|
|
|
unset: 'destroy',
|
|
|
secret: 'nothing', // 兼容 PHP SESSION,sessionID 不加密
|
|
|
name: 'PHPSESSID', // 兼容 PHP SESSION
|
|
|
genid: () => {
|
|
|
return uuid.v4(); // 兼容 PHP SESSION
|
|
|
},
|
|
|
proxy: true,
|
|
|
resave: false,
|
|
|
saveUninitialized: true,
|
|
|
unset: 'destroy',
|
|
|
cookie: {
|
|
|
domain: 'yohobuy.com',
|
|
|
path: '/',
|
|
|
httpOnly: true,
|
|
|
secure: false,
|
|
|
maxAge: null
|
|
|
},
|
|
|
store: new MemcachedStore({
|
|
|
hosts: config.memcache.session,
|
|
|
prefix: 'qinsessionsession:', // 兼容 PHP SESSION
|
...
|
...
|
|