optimize matcher performance
Some checks failed
Build Dev / prepare (push) Has been cancelled
Build Dev / build (amd64, darwin) (push) Has been cancelled
Build Dev / build (amd64, freebsd) (push) Has been cancelled
Build Dev / build (amd64, linux) (push) Has been cancelled
Build Dev / build (arm64, darwin) (push) Has been cancelled
Build Dev / build (arm64, freebsd) (push) Has been cancelled
Build Dev / build (arm64, linux) (push) Has been cancelled
Build Dev / docker (push) Has been cancelled

This commit is contained in:
wjqserver 2025-06-09 06:58:21 +08:00
parent f706615d87
commit 5dde21a403
5 changed files with 536 additions and 115 deletions

View file

@ -110,7 +110,7 @@ func ChunkedProxyRequest(ctx context.Context, c *app.RequestContext, u string, c
bodyReader = limitreader.NewRateLimitedReader(bodyReader, bandwidthLimit, int(bandwidthBurst), ctx)
}
if MatcherShell(u) && matchString(matcher, matchedMatchers) && cfg.Shell.Editor {
if MatcherShell(u) && matchString(matcher) && cfg.Shell.Editor {
// 判断body是不是gzip
var compress string
if resp.Header.Get("Content-Encoding") == "gzip" {