提交 71809217 authored 作者: GOD_ZYX's avatar GOD_ZYX

sesssion 设置

上级 4d56478d
...@@ -3,7 +3,7 @@ let conf = {} ...@@ -3,7 +3,7 @@ let conf = {}
if (state === 'test') { if (state === 'test') {
conf.agentApiUrl = 'http://api.ezijing.com/' conf.agentApiUrl = 'http://api.ezijing.com/'
// conf.agentApiUrl = 'http://10.1.1.5:8024/' // conf.agentApiUrl = 'http://10.1.1.5:8024/'
// conf.agentApiUrl = 'http://192.168.3.254:8081' conf.agentApiUrl = 'http://192.168.3.254:8081'
} else if (state === 'production') { } else if (state === 'production') {
conf.agentApiUrl = 'http://api.ezijing.com/' conf.agentApiUrl = 'http://api.ezijing.com/'
} }
......
...@@ -38,7 +38,7 @@ const agentProcessor = () => { ...@@ -38,7 +38,7 @@ const agentProcessor = () => {
try { try {
options = { options = {
timeout: 30 * 1000, timeout: 30 * 1000,
url: req.params[0], // .replace(/tenant\//gi, '') url: req.params[0].replace(/tenant\//gi, ''), //
baseURL: conf.agentApiUrl, baseURL: conf.agentApiUrl,
method: req.method, method: req.method,
data: req.body, data: req.body,
......
...@@ -12,9 +12,9 @@ let sessionOpts = { ...@@ -12,9 +12,9 @@ let sessionOpts = {
// Forces a session that is "uninitialized" to be saved to the store. // Forces a session that is "uninitialized" to be saved to the store.
saveUninitialized: true, saveUninitialized: true,
// 设置会话cookie名, 默认是connect.sid // 设置会话cookie名, 默认是connect.sid
key: 'myapp_sid' key: 'myapp_sid',
// If secure is set to true, and you access your site over HTTP, the cookie will not be set. // If secure is set to true, and you access your site over HTTP, the cookie will not be set.
// cookie: {} cookie: { maxAge: 1000 * 60 * 60 * 2, secure: false }
} }
app.set('port', process.env.SERVER_PORT || 3000) app.set('port', process.env.SERVER_PORT || 3000)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论