mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-07-29 00:59:10 +00:00
update doc
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
read the following wiki before using rule file
|
||||
https://github.com/alibaba/anyproxy/wiki/What-is-rule-file-and-how-to-write-one
|
||||
*/
|
||||
module.exports = {
|
||||
/*
|
||||
These functions will overwrite the default ones, write your own when necessary.
|
||||
@@ -16,6 +20,12 @@ module.exports = {
|
||||
//收到用户请求之后
|
||||
//=======================
|
||||
|
||||
//是否截获https请求
|
||||
//should intercept https request, or it will be forwarded to real server
|
||||
shouldInterceptHttpsReq :function(req){
|
||||
return false;
|
||||
},
|
||||
|
||||
//是否在本地直接发送响应(不再向服务器发出请求)
|
||||
//whether to intercept this request by local logic
|
||||
//if the return value is true, anyproxy will call dealLocalResponse to get response data and will not send request to remote server anymore
|
||||
@@ -103,18 +113,6 @@ module.exports = {
|
||||
pauseBeforeSendingResponse : function(req,res){
|
||||
var timeInMS = 1; //delay all requests for 1ms
|
||||
return timeInMS;
|
||||
},
|
||||
|
||||
|
||||
|
||||
//=======================
|
||||
//https config
|
||||
//=======================
|
||||
|
||||
//是否截获https请求
|
||||
//should intercept https request, or it will be forwarded to real server
|
||||
shouldInterceptHttpsReq :function(req){
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
Reference in New Issue
Block a user