From b1bb1cb734472c38248d93916f01d6c886d0087a Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sat, 6 Sep 2025 14:01:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8B=E8=BD=BD=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/tool.go | 4 ++-- proto/conf.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handler/tool.go b/handler/tool.go index 9342803..f4bdc98 100644 --- a/handler/tool.go +++ b/handler/tool.go @@ -60,7 +60,7 @@ func SetUpToolGroup(router *gin.Engine) { //发送邮件 toolGroup.POST("/send_mail", SendMailTool) //下载代理 - toolGroup.GET("/dl/:url", DownloadProxyHandle) + toolGroup.GET("/dlp", DownloadProxyHandle) } func GetMonitorList(c *gin.Context) { @@ -497,7 +497,7 @@ func DownloadProxyHandle(c *gin.Context) { c.JSON(http.StatusOK, gin.H{"code": proto.ParameterError, "message": "failed, key is null or error"}) } // 获取URL参数 - encodedURL := c.Param("url") + encodedURL := c.Query("url") if encodedURL == "" { c.JSON(http.StatusBadRequest, gin.H{"error": "URL参数不能为空", "code": proto.ParameterError, "message": "failed"}) return diff --git a/proto/conf.go b/proto/conf.go index 0db119b..efc9b20 100644 --- a/proto/conf.go +++ b/proto/conf.go @@ -12,7 +12,7 @@ import ( var Config ConfigStruct var SigningKey = []byte{} -var Url_map = map[string]bool{"/login": true, "/register": true, "/uuid": true, "/gqr": true, "/cid/callback": true, "/tool/monitor": true, "/user/sync": true, "/tool/file/": true, "/user/reset": true} // 不需要token验证的url +var Url_map = map[string]bool{"/login": true, "/register": true, "/uuid": true, "/gqr": true, "/cid/callback": true, "/tool/monitor": true, "/user/sync": true, "/tool/file/": true, "/user/reset": true, "/tool/dlp": true} // 不需要token验证的url var Per_menu_map = map[string]int{"/video/": 1, "/device/": 2, "/cid/": 3} var File_Type = map[string]int{"im": 1, "avatar": 2, "file": 3, "config": 4} // 文件类型