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

update

上级 3283bf91
......@@ -6,7 +6,7 @@ if (state === 'test') {
// conf.agentApiUrl = 'http://10.1.1.5:8024/'
// conf.agentApiUrl = 'http://192.168.3.254:8081'
} else if (state === 'production') {
conf.agentApiUrl = 'https://api.ezijing.com/'
conf.agentApiUrl = 'https://zapi.ezijing.com/'
}
global.app = null
......
......@@ -40,17 +40,14 @@ const agentProcessor = () => {
data: req.body,
params: req.query
}
const state = process.env.NODE_ENV
if (state === 'test') {
options.url = options.url.replace(/tenant\//gi, '')
headers['apikey'] = 'mwLyCymyEVCcKTn7nKDjYIMPBwScbugX'
if (/user_center/gi.test(options.url)) {
headers['Host'] = 'sso.ezijing.com'
headers['host'] = 'sso.ezijing.com'
} else {
headers['Host'] = 'lms-api.ezijing.com'
headers['host'] = 'lms-api.ezijing.com'
}
options.url = options.url.replace(/tenant\//gi, '')
headers['apikey'] = 'mwLyCymyEVCcKTn7nKDjYIMPBwScbugX'
if (/user_center/gi.test(options.url)) {
headers['Host'] = 'sso.ezijing.com'
headers['host'] = 'sso.ezijing.com'
} else {
headers['Host'] = 'lms-api.ezijing.com'
headers['host'] = 'lms-api.ezijing.com'
}
/* 测试 */
// if (/\/essay/gi.test(options.url) && /post/gi.test(req.method)) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论