diff --git a/config.go b/config.go index 7b7d2c0..080ddd2 100644 --- a/config.go +++ b/config.go @@ -23,7 +23,9 @@ var AlwaysIgnoreDomains = []string{ "autopatchos.starrails.com", } -var AlwaysIgnoreUrls = []string{ +var AlwaysIgnoreUrls = []string{} + +var EmptyUrls = []string{ "/query_security_file", } diff --git a/main.go b/main.go index fbccdd2..f8e439c 100644 --- a/main.go +++ b/main.go @@ -141,6 +141,17 @@ func main() { return req, nil } + if matchURL(path, EmptyUrls) { + full := req.URL.String() + zlog.Warn().Str("url", full).Msg("Empty URL Response") + return req, goproxy.NewResponse( + req, + goproxy.ContentTypeText, + http.StatusOK, + "", + ) + } + if matchDomain(host, RedirectDomains) { if matchURL(path, BlockUrls) { full := req.URL.String() diff --git a/script/release.json b/script/release.json index 3c8041b..eefbcfa 100644 --- a/script/release.json +++ b/script/release.json @@ -1,5 +1,5 @@ { - "tag": "1.3-01", - "title": "PreBuild Version 1.3 - 01" + "tag": "1.3-02", + "title": "PreBuild Version 1.3 - 02" } \ No newline at end of file