Showing
4 changed files
with
11 additions
and
5 deletions
@@ -27,7 +27,7 @@ var options = { | @@ -27,7 +27,7 @@ var options = { | ||
27 | }, | 27 | }, |
28 | loggers:config.loggers, | 28 | loggers:config.loggers, |
29 | seStore:config.redis, | 29 | seStore:config.redis, |
30 | - port:30012, | 30 | + port:config.port, |
31 | beforeMid:function(app,mids) {//使用handlebars-layouts | 31 | beforeMid:function(app,mids) {//使用handlebars-layouts |
32 | require('handlebars-layouts').register(mids.hbs.handlebars); | 32 | require('handlebars-layouts').register(mids.hbs.handlebars); |
33 | app.use(multipart()); | 33 | app.use(multipart()); |
@@ -12,7 +12,7 @@ var config = { | @@ -12,7 +12,7 @@ var config = { | ||
12 | 'development': { | 12 | 'development': { |
13 | redis: null, | 13 | redis: null, |
14 | apiKey: 'sd4H1ecAqlp', | 14 | apiKey: 'sd4H1ecAqlp', |
15 | - | 15 | + port:30016, |
16 | domain: 'http://192.168.102.202:8088/platform', | 16 | domain: 'http://192.168.102.202:8088/platform', |
17 | loggers: { | 17 | loggers: { |
18 | api: { | 18 | api: { |
@@ -32,6 +32,7 @@ var config = { | @@ -32,6 +32,7 @@ var config = { | ||
32 | host: 'localhost' | 32 | host: 'localhost' |
33 | }, | 33 | }, |
34 | apiKey: 'sd4H1ecAqlp', | 34 | apiKey: 'sd4H1ecAqlp', |
35 | + port:30016, | ||
35 | domain: 'http://192.168.102.202:8088/platform', | 36 | domain: 'http://192.168.102.202:8088/platform', |
36 | logsFile: '/Data/logs/node/yohobuy-portal-log/', | 37 | logsFile: '/Data/logs/node/yohobuy-portal-log/', |
37 | loggers: { | 38 | loggers: { |
@@ -52,6 +53,7 @@ var config = { | @@ -52,6 +53,7 @@ var config = { | ||
52 | host: '192.168.74.17' | 53 | host: '192.168.74.17' |
53 | }, | 54 | }, |
54 | apiKey: 'sd4H1ecAqlp', | 55 | apiKey: 'sd4H1ecAqlp', |
56 | + port:30016, | ||
55 | domain: 'http://192.168.102.202:8081/platform', | 57 | domain: 'http://192.168.102.202:8081/platform', |
56 | logsFile: '/Data/logs/node/yohobuy-portal-log/', | 58 | logsFile: '/Data/logs/node/yohobuy-portal-log/', |
57 | loggers: { | 59 | loggers: { |
@@ -72,6 +74,7 @@ var config = { | @@ -72,6 +74,7 @@ var config = { | ||
72 | host: 'localhost' | 74 | host: 'localhost' |
73 | }, | 75 | }, |
74 | apiKey: 'sd4H1ecAqlp', | 76 | apiKey: 'sd4H1ecAqlp', |
77 | + port:30016, | ||
75 | domain: 'http://192.168.81.6:8189/yoho-admin-portal', | 78 | domain: 'http://192.168.81.6:8189/yoho-admin-portal', |
76 | logsFile: '/Data/logs/node/yohobuy-portal-log/', | 79 | logsFile: '/Data/logs/node/yohobuy-portal-log/', |
77 | loggers: { | 80 | loggers: { |
@@ -2,10 +2,12 @@ | @@ -2,10 +2,12 @@ | ||
2 | * 路由接口映射 | 2 | * 路由接口映射 |
3 | * @author h1bomb | 3 | * @author h1bomb |
4 | */ | 4 | */ |
5 | -var connfig=require("../staticConfig.js"); | 5 | + |
6 | var env = process.env.NODE_ENV || 'development'; | 6 | var env = process.env.NODE_ENV || 'development'; |
7 | +var config = require('../config/common'); | ||
8 | + | ||
7 | //接口主域 | 9 | //接口主域 |
8 | -exports.domain = 'http://localhost:30012'; | 10 | +exports.domain = 'http://localhost'+config.port; |
9 | //路由配置 | 11 | //路由配置 |
10 | exports.res = | 12 | exports.res = |
11 | [{ | 13 | [{ |
@@ -45,7 +45,8 @@ module.exports = function(proxyRoute) { | @@ -45,7 +45,8 @@ module.exports = function(proxyRoute) { | ||
45 | } | 45 | } |
46 | //删除提交内容长度,代理会改变长度 | 46 | //删除提交内容长度,代理会改变长度 |
47 | delete options.headers['content-length']; | 47 | delete options.headers['content-length']; |
48 | - | 48 | + //移除GZIP的头部 |
49 | + delete options.headers["accept-encoding"]; | ||
49 | //设置代理host | 50 | //设置代理host |
50 | options.headers['host'] = config.url.replace('http://',''); | 51 | options.headers['host'] = config.url.replace('http://',''); |
51 | if(!req.session.gray) { | 52 | if(!req.session.gray) { |
-
Please register or login to post a comment