Authored by 周奇琪

调整端口号,并把端口号放入配置文件

... ... @@ -27,7 +27,7 @@ var options = {
},
loggers:config.loggers,
seStore:config.redis,
port:30012,
port:config.port,
beforeMid:function(app,mids) {//使用handlebars-layouts
require('handlebars-layouts').register(mids.hbs.handlebars);
app.use(multipart());
... ...
... ... @@ -12,7 +12,7 @@ var config = {
'development': {
redis: null,
apiKey: 'sd4H1ecAqlp',
port:30016,
domain: 'http://192.168.102.202:8088/platform',
loggers: {
api: {
... ... @@ -32,6 +32,7 @@ var config = {
host: 'localhost'
},
apiKey: 'sd4H1ecAqlp',
port:30016,
domain: 'http://192.168.102.202:8088/platform',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
... ... @@ -52,6 +53,7 @@ var config = {
host: '192.168.74.17'
},
apiKey: 'sd4H1ecAqlp',
port:30016,
domain: 'http://192.168.102.202:8081/platform',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
... ... @@ -72,6 +74,7 @@ var config = {
host: 'localhost'
},
apiKey: 'sd4H1ecAqlp',
port:30016,
domain: 'http://192.168.81.6:8189/yoho-admin-portal',
logsFile: '/Data/logs/node/yohobuy-portal-log/',
loggers: {
... ...
... ... @@ -2,10 +2,12 @@
* 路由接口映射
* @author h1bomb
*/
var connfig=require("../staticConfig.js");
var env = process.env.NODE_ENV || 'development';
var config = require('../config/common');
//接口主域
exports.domain = 'http://localhost:30012';
exports.domain = 'http://localhost'+config.port;
//路由配置
exports.res =
[{
... ...
... ... @@ -45,7 +45,8 @@ module.exports = function(proxyRoute) {
}
//删除提交内容长度,代理会改变长度
delete options.headers['content-length'];
//移除GZIP的头部
delete options.headers["accept-encoding"];
//设置代理host
options.headers['host'] = config.url.replace('http://','');
if(!req.session.gray) {
... ...