支持禁用前端静态文件路由

This commit is contained in:
user123
2026-01-26 23:06:05 +08:00
parent 6659e977ae
commit 11c34459ca
5 changed files with 99 additions and 67 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ func proxyGitHubWithRedirect(c *gin.Context, u string, redirectCount int) {
fmt.Printf("关闭响应体失败: %v\n", err)
}
}()
// 检查并处理被阻止的内容类型
if c.Request.Method == "GET" {
if contentType := resp.Header.Get("Content-Type"); blockedContentTypes[strings.ToLower(strings.Split(contentType, ";")[0])] {