From 0cd5a7334d6e6231e69a8672348fa20e04126822 Mon Sep 17 00:00:00 2001 From: starry <115192496+sky22333@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0.ps1=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/handlers/github.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handlers/github.go b/src/handlers/github.go index 70919c8..30b661e 100644 --- a/src/handlers/github.go +++ b/src/handlers/github.go @@ -171,8 +171,8 @@ func proxyGitHubWithRedirect(c *gin.Context, u string, redirectCount int) { realHost = "https://" + realHost } - // 处理.sh文件的智能处理 - if strings.HasSuffix(strings.ToLower(u), ".sh") { + // 处理.sh和.ps1文件的智能处理 + if strings.HasSuffix(strings.ToLower(u), ".sh") || strings.HasSuffix(strings.ToLower(u), ".ps1") { isGzipCompressed := resp.Header.Get("Content-Encoding") == "gzip" processedBody, processedSize, err := utils.ProcessSmart(resp.Body, isGzipCompressed, realHost)