update web ui

This commit is contained in:
OttoMao
2015-07-09 18:51:41 +08:00
parent c80acde287
commit 8b138ffe64
7 changed files with 37 additions and 32 deletions

View File

@@ -10,7 +10,7 @@ var mapConfig = [];
module.exports = {
summary:function(){
var tip = "the default rule for anyproxy which supports CORS. ";
var tip = "the default rule for AnyProxy which supports CORS. ";
if(!isRootCAFileExists){
tip += "\nRoot CA does not exist, will not intercept any https requests.";
}
@@ -40,13 +40,13 @@ module.exports = {
if(req.method == "OPTIONS"){
callback(200,mergeCORSHeader(req.headers),"");
}else if(req.anyproxy_map_local){
try{
var fileContent = fs.readFile(req.anyproxy_map_local,function(err,buffer){
fs.readFile(req.anyproxy_map_local,function(err,buffer){
if(err){
callback(200, {}, "[AnyProxy failed to load local file] " + err);
}else{
callback(200, {}, buffer);
});
}catch(e){
callback(200, {}, "failed to load local file :" + req.anyproxy_map_local);
}
}
});
}
},