mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-06-07 01:38:21 +00:00
sleep for seconds if configed in rule file
This commit is contained in:
parent
cfd3a248ce
commit
a9927188e2
@ -82,7 +82,7 @@ function userRequestHandler(req,userRes){
|
|||||||
//sleep for seconds if configed in the rule file
|
//sleep for seconds if configed in the rule file
|
||||||
//see rule_sample.js
|
//see rule_sample.js
|
||||||
if(hostTest && pathTest && !!rule.sleep){
|
if(hostTest && pathTest && !!rule.sleep){
|
||||||
console.log(color.yellow('[' + req.url + '] will sleep for ' + rule.sleep + ' seconds'));
|
console.log(color.yellow('[' + req.url + '] will sleep for ' + rule.sleep + ' seconds.'));
|
||||||
sleep.sleep(rule.sleep);
|
sleep.sleep(rule.sleep);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user