更新为v1.1.8

This commit is contained in:
starry
2025-09-02 10:33:41 +08:00
committed by GitHub
parent 75833b937b
commit 68868388d3
2 changed files with 2 additions and 8 deletions

View File

@@ -135,17 +135,11 @@ func proxyGitHubWithRedirect(c *gin.Context, u string, redirectCount int) {
if contentType := resp.Header.Get("Content-Type"); blockedContentTypes[strings.ToLower(strings.Split(contentType, ";")[0])] {
c.JSON(http.StatusForbidden, map[string]string{
"error": "Content type not allowed",
"message": "检测到网页内容,本服务不支持加速网页,仅支持加速资源下载。",
"message": "检测到网页类型,本服务不支持加速网页,请检查您的链接是否正确。",
})
return
}
}
// 如果Github上游404则返回错误信息。这样处理是否会更好点暂时先用检查内容类型的方式吧防止返回网页内容。欢迎大佬们提供更好的方案。
// if resp.StatusCode == http.StatusNotFound {
// c.String(http.StatusForbidden, "无效的GitHub地址")
// return
// }
// 检查文件大小限制
cfg := config.GetConfig()

View File

@@ -125,7 +125,7 @@ func main() {
fmt.Printf("H2c: 已启用\n")
}
fmt.Printf("版本号: v1.1.7\n")
fmt.Printf("版本号: v1.1.8\n")
fmt.Printf("项目地址: https://github.com/sky22333/hubproxy\n")
// 创建HTTP2服务器