mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
Add test cases for the proxy, and do some tiny fixes.
the fixes are: 1. add "content-type" in headers for when dealing with localresponse 2. make a more accurate tip for throttle rate when lower than 1 3. make the crtMgr funcionality a more independent one 4. uppercase the request header before sending it out update the tip
This commit is contained in:
@@ -73,6 +73,7 @@ setTimeout(function(){
|
||||
|
||||
|
||||
module.exports = {
|
||||
token: Date.now(),
|
||||
summary:function(){
|
||||
var tip = "the default rule for AnyProxy.";
|
||||
if(!isRootCAFileExists){
|
||||
@@ -102,7 +103,10 @@ module.exports = {
|
||||
if(err){
|
||||
callback(200, {}, "[AnyProxy failed to load local file] " + err);
|
||||
}else{
|
||||
callback(200, {}, buffer);
|
||||
var header = {
|
||||
'Content-Type': utils.contentType(req.anyproxy_map_local)
|
||||
};
|
||||
callback(200, header, buffer);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user