mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-10 14:58:27 +00:00
41 lines
867 B
JavaScript
41 lines
867 B
JavaScript
|
//rule scheme :
|
||
|
|
||
|
module.exports = {
|
||
|
shouldUseLocalResponse : function(req){
|
||
|
},
|
||
|
|
||
|
dealLocalResponse : function(req,callback){
|
||
|
},
|
||
|
|
||
|
replaceRequestOption : function(req,option){
|
||
|
},
|
||
|
|
||
|
replaceRequestProtocol:function(req,protocol){
|
||
|
},
|
||
|
|
||
|
replaceResponseStatusCode: function(req,res,statusCode){
|
||
|
},
|
||
|
|
||
|
replaceResponseHeader: function(req,res,header){
|
||
|
header = header || {};
|
||
|
header["Cache-Control"] = "no-cache, no-store, must-revalidate";
|
||
|
header["Pragma"] = "no-cache";
|
||
|
header["Expires"] = 0;
|
||
|
|
||
|
return header;
|
||
|
},
|
||
|
|
||
|
replaceServerResData: function(req,res,serverResData){
|
||
|
},
|
||
|
|
||
|
pauseBeforeSendingResponse : function(req,res){
|
||
|
},
|
||
|
|
||
|
shouldInterceptHttpsReq :function(req){
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
function disableCacheHeader(header){
|
||
|
|
||
|
}
|