fix: 移除 RestartBotHandler 中的 token 日志记录,以提高安全性
This commit is contained in:
parent
fe376e7f9e
commit
99ab104312
@ -188,7 +188,6 @@ func BuildBotHandler(c *gin.Context) {
|
|||||||
|
|
||||||
func RestartBotHandler(c *gin.Context) {
|
func RestartBotHandler(c *gin.Context) {
|
||||||
token := c.Request.Header.Get("Authorization")
|
token := c.Request.Header.Get("Authorization")
|
||||||
log.Println("获取到token:", token)
|
|
||||||
if token != config.ConfigManager.GetConfig().WebServer.Token {
|
if token != config.ConfigManager.GetConfig().WebServer.Token {
|
||||||
c.JSON(http.StatusUnauthorized, gin.H{"error": "Unauthorized"})
|
c.JSON(http.StatusUnauthorized, gin.H{"error": "Unauthorized"})
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user