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} // 文件类型