增加.ps1脚本的处理
This commit is contained in:
@@ -171,8 +171,8 @@ func proxyGitHubWithRedirect(c *gin.Context, u string, redirectCount int) {
|
|||||||
realHost = "https://" + realHost
|
realHost = "https://" + realHost
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理.sh文件的智能处理
|
// 处理.sh和.ps1文件的智能处理
|
||||||
if strings.HasSuffix(strings.ToLower(u), ".sh") {
|
if strings.HasSuffix(strings.ToLower(u), ".sh") || strings.HasSuffix(strings.ToLower(u), ".ps1") {
|
||||||
isGzipCompressed := resp.Header.Get("Content-Encoding") == "gzip"
|
isGzipCompressed := resp.Header.Get("Content-Encoding") == "gzip"
|
||||||
|
|
||||||
processedBody, processedSize, err := utils.ProcessSmart(resp.Body, isGzipCompressed, realHost)
|
processedBody, processedSize, err := utils.ProcessSmart(resp.Body, isGzipCompressed, realHost)
|
||||||
|
|||||||
Reference in New Issue
Block a user