mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
update web ui
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user