mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 11:33:48 +08:00
fix pprof.
This commit is contained in:
parent
d8b9eb611f
commit
302ae89a75
@ -318,6 +318,10 @@ func AuthMiddleWare() gin.HandlerFunc {
|
||||
if c.Request.Method == "OPTIONS" {
|
||||
c.AbortWithStatus(http.StatusNoContent)
|
||||
}
|
||||
if strings.Contains(c.Request.URL.Path, "debug") {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
// 处理请求
|
||||
if c.Request.Method != "GET" && c.Request.Method != "POST" {
|
||||
log.Warnf("已拒绝客户端 %v 的请求: 方法错误", c.Request.RemoteAddr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user