mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
smart intercept https request when rootCA exists
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
var isRootCAFileExists = require("./certMgr.js").isRootCAFileExists();
|
||||
|
||||
module.exports = {
|
||||
summary:function(){
|
||||
return "the default rule for anyproxy, support : CORS / HTTPS(if root cert is ready)";
|
||||
var tip = "the default rule for anyproxy, support : CORS";
|
||||
if(isRootCAFileExists){
|
||||
tip += "\nRoot CA exists, will intercept all https requests for you";
|
||||
}
|
||||
return tip;
|
||||
},
|
||||
|
||||
shouldUseLocalResponse : function(req,reqBody){
|
||||
@@ -41,7 +47,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
shouldInterceptHttpsReq :function(req){
|
||||
return false;
|
||||
return isRootCAFileExists;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user