2018-01-17 01:57:27 +08:00
|
|
|
rules {
|
2018-12-16 04:23:42 +08:00
|
|
|
QUARANTINE {
|
|
|
|
backend = "http";
|
|
|
|
url = "http://nginx:9081/pipe.php";
|
|
|
|
selector = "is_reject";
|
|
|
|
formatter = "default";
|
|
|
|
meta_headers = true;
|
|
|
|
}
|
|
|
|
RLINFO {
|
|
|
|
backend = "http";
|
|
|
|
url = "http://nginx:9081/pipe_rl.php";
|
|
|
|
selector = "ratelimited";
|
|
|
|
formatter = "json";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
custom_select {
|
|
|
|
ratelimited = <<EOD
|
|
|
|
return function(task)
|
|
|
|
local ratelimited = task:get_symbol("RATELIMITED")
|
|
|
|
if ratelimited then
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
return
|
|
|
|
end
|
|
|
|
EOD;
|
2018-01-17 01:57:27 +08:00
|
|
|
}
|