wangshan há 1 semana atrás
pai
commit
062cca1046
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      internal/middleware/cookie.go

+ 6 - 1
internal/middleware/cookie.go

@@ -1,10 +1,15 @@
 package middleware
 package middleware
 
 
-import "github.com/gogf/gf/v2/net/ghttp"
+import (
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/net/ghttp"
+	"github.com/gogf/gf/v2/os/gctx"
+)
 
 
 // SetSeoRefer seo来源标记
 // SetSeoRefer seo来源标记
 func SetSeoRefer(r *ghttp.Request) {
 func SetSeoRefer(r *ghttp.Request) {
 	val := r.Cookie.Get("SESSIONID")
 	val := r.Cookie.Get("SESSIONID")
+	g.Log().Info(gctx.New(), "-------------------------------", val.String())
 	if !val.IsNil() && val.String() != "" {
 	if !val.IsNil() && val.String() != "" {
 		if val = r.Cookie.Get("SeoRefer"); val.IsNil() {
 		if val = r.Cookie.Get("SeoRefer"); val.IsNil() {
 			r.Cookie.Set("SeoRefer", r.Referer())
 			r.Cookie.Set("SeoRefer", r.Referer())