From b8d01ef422bf44f1f38f2738d6f884a6db1c1d1d Mon Sep 17 00:00:00 2001 From: jweny Date: Mon, 24 May 2021 11:40:03 +0800 Subject: [PATCH] =?UTF-8?q?Debug=20:=20run=20poc=20limiter=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E4=BD=8D=E7=BD=AE=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/cli.go | 3 --- poc/rule/handle.go | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/cli.go b/cmd/cli.go index 25e2611..785877e 100644 --- a/cmd/cli.go +++ b/cmd/cli.go @@ -75,9 +75,6 @@ func RunCli(c *cli.Context) error{ } logging.GlobalLogger.Debug("[plugins load success]") - // 速率限制 - rule.InitRate() - switch { case url != "": oreq, err := util.GenOriginalReq(url) diff --git a/poc/rule/handle.go b/poc/rule/handle.go index daf29ef..763b332 100644 --- a/poc/rule/handle.go +++ b/poc/rule/handle.go @@ -105,6 +105,9 @@ func Setup() { Handles[AffectScript] = []HandlerFunc{ExecScriptHandle} Handles[AffectAppendParameter] = []HandlerFunc{ExecExpressionHandle} Handles[AffectReplaceParameter] = []HandlerFunc{ExecExpressionHandle} + + // 速率限制 + InitRate() } func getHandles(affect string) []HandlerFunc {