Browse Source

Merge branch 'dev/v4.8.52_dx' of qmx/jy into feature/v4.8.52

duxin 1 năm trước cách đây
mục cha
commit
1f2d108bdd
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/jfw/filter/anonymousUser.go

+ 2 - 2
src/jfw/filter/anonymousUser.go

@@ -101,8 +101,8 @@ func (sk *AnonymousAuth) Do() {
 	if jyTrustedId == nil || jyTrustedId.Value == "" { //不存在信用标识
 		jyGuestUID, _ := sk.R.Cookie("JYGuestUID")
 		if jyGuestUID == nil || jyGuestUID.Value == "" { //不存在后端id 生成后端id 并创建匿名身份信息
-			contentType := sk.R.Header.Get("Content-Type")
-			if sk.R.Method != "GET" || !strings.Contains(contentType, "text/html") { //避免多请求
+			accept := sk.R.Header.Get("Accept")
+			if sk.R.Method != "GET" || !strings.Contains(accept, "text/html") { //避免多请求
 				return
 			}
 			guestUID := node.Generate()