wangchuanjin 1 rok temu
rodzic
commit
85631bfa34
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      core/proxy/broker/outServer/SussBi.go

+ 4 - 0
core/proxy/broker/outServer/SussBi.go

@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"io"
 	"io/ioutil"
+	"log"
 	"net/http"
 	"net/http/cookiejar"
 	"net/url"
@@ -154,10 +155,12 @@ func (s *sussBi) RequestLogin(r *ghttp.Request) error {
 		//cookies2 := s.succbiJar.Cookies(s.Url)
 		//fmt.Println(cookies2)
 		if cookies := s.succbiJar.Cookies(u); len(cookies) > 0 {
+			cookies[0].HttpOnly = false
 			r.Request.AddCookie(cookies[0])
 		}
 	} else {
 		if cookies := s.jar.Cookies(s.Url); len(cookies) > 0 {
+			cookies[0].HttpOnly = false
 			r.Request.AddCookie(cookies[0])
 		}
 	}
@@ -176,6 +179,7 @@ func (s *sussBi) Filter(r *ghttp.Request) error {
 	ctx := router.GetGContext(r.GetCtx())
 	md5Val := common.GetMd5String(fmt.Sprintf("%s_%s_%d_%d_%d_%d_%d_%d_%s_%d_%s_%d", ctx.Sess.NickName, ctx.Sess.YyName, ctx.Sess.EntRole, ctx.Sess.EntNicheDis, ctx.Sess.PositionId, ctx.Sess.AccountId, ctx.Sess.EntAccountId, ctx.Sess.EntId, ctx.Sess.EntName, ctx.Sess.EntDeptId, ctx.Sess.EntUserName, ctx.Sess.EntUserId))
 	if j_cookie, j_error := r.Request.Cookie("JSESSIONID"); j_error == nil && j_cookie != nil && j_cookie.Value != md5Val {
+		log.Println("========删除 JSESSIONID", j_cookie.Value)
 		http.SetCookie(r.Response.ResponseWriter, &http.Cookie{
 			Name:   "JSESSIONID",
 			MaxAge: -1,