test config

This commit is contained in:
加里 2014-08-29 09:16:48 +08:00
parent 1f32f77c8c
commit ef9f00630d
3 changed files with 11 additions and 10 deletions

1
bin.js
View File

@ -26,4 +26,5 @@ if(program.clear){
}); });
}else{ }else{
new proxy.proxyServer(program.type,program.port, program.host ,program.rule); new proxy.proxyServer(program.type,program.port, program.host ,program.rule);
} }

View File

@ -257,16 +257,16 @@ function mergeCORSHeader(reqHeader,originHeader){
targetObj["access-control-allow-headers"] = reqHeader['access-control-request-headers'] || "-___-||"; targetObj["access-control-allow-headers"] = reqHeader['access-control-request-headers'] || "-___-||";
// //
targetObj["Transfer-Encoding"] = "chunked"; // targetObj["Transfer-Encoding"] = "chunked";
// Disable caching // // Disable caching
// If the response status is 304 not modified, the data event of response will not emmit // // If the response status is 304 not modified, the data event of response will not emmit
targetObj["Cache-Control"] = "no-cache, no-store, must-revalidate"; // targetObj["Cache-Control"] = "no-cache, no-store, must-revalidate";
targetObj["Pragma"] = "no-cache"; // targetObj["Pragma"] = "no-cache";
targetObj["Expires"] = 0; // targetObj["Expires"] = 0;
// // //
targetObj["server"] = "anyproxy server"; // targetObj["server"] = "anyproxy server";
targetObj["x-powered-by"] = "Alipay-ct-wd"; // targetObj["x-powered-by"] = "Alipay-ct-wd";
return targetObj; return targetObj;
} }

View File

@ -33,7 +33,7 @@ var rules = {
] ]
,"httpsConfig":{ ,"httpsConfig":{
"bypassAll" : false, //by setting this to true, anyproxy will not intercept any https request "bypassAll" : false, //by setting this to true, anyproxy will not intercept any https request
"interceptDomains":[/www\.a\.com/,/www\.b\.com/] //by setting bypassAll:false, requests towards these domains will be intercepted, and try to meet the map rules above "interceptDomains":[/www\.alipay\.com/,/www\.b\.com/] //by setting bypassAll:false, requests towards these domains will be intercepted, and try to meet the map rules above
} }
} }