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 {