diff --git a/bin.js b/bin.js index edd81b1..ea86b51 100644 --- a/bin.js +++ b/bin.js @@ -26,4 +26,5 @@ if(program.clear){ }); }else{ new proxy.proxyServer(program.type,program.port, program.host ,program.rule); + } \ No newline at end of file diff --git a/lib/requestHandler.js b/lib/requestHandler.js index 3dc58cb..542eb7c 100644 --- a/lib/requestHandler.js +++ b/lib/requestHandler.js @@ -257,16 +257,16 @@ function mergeCORSHeader(reqHeader,originHeader){ targetObj["access-control-allow-headers"] = reqHeader['access-control-request-headers'] || "-___-||"; // - targetObj["Transfer-Encoding"] = "chunked"; + // targetObj["Transfer-Encoding"] = "chunked"; - // Disable caching - // 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["Pragma"] = "no-cache"; - targetObj["Expires"] = 0; - // - targetObj["server"] = "anyproxy server"; - targetObj["x-powered-by"] = "Alipay-ct-wd"; + // // Disable caching + // // 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["Pragma"] = "no-cache"; + // targetObj["Expires"] = 0; + // // + // targetObj["server"] = "anyproxy server"; + // targetObj["x-powered-by"] = "Alipay-ct-wd"; return targetObj; } diff --git a/rule_sample.js b/rule_sample.js index 7470d01..9334d77 100644 --- a/rule_sample.js +++ b/rule_sample.js @@ -33,7 +33,7 @@ var rules = { ] ,"httpsConfig":{ "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 } }