From 7addfa5581a82c36579a91ad2c04464d55f1f939 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Sun, 13 Nov 2022 14:52:46 +0800 Subject: [PATCH] opt some --- base/web/serve.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/base/web/serve.go b/base/web/serve.go index 2d48ac25..f66e48b0 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -281,11 +281,7 @@ func _serve_handle(key string, cmd *ice.Command, msg *ice.Message, w http.Respon } func _serve_login(msg *ice.Message, key string, cmds []string, w http.ResponseWriter, r *http.Request) ([]string, bool) { aaa.SessCheck(msg, msg.Option(ice.MSG_SESSID)) // 会话认证 - - if msg.Config("staffname") != "" { - aaa.UserLogin(msg, r.Header.Get("Staffname"), "") - } - + if msg.Option(ice.MSG_USERNAME) == "" && msg.Config(tcp.LOCALHOST) == ice.TRUE && tcp.IsLocalHost(msg, msg.Option(ice.MSG_USERIP)) { aaa.UserRoot(msg) // 本机认证 }