Browse Source

cookie修改

wangchuanjin 2 năm trước cách đây
mục cha
commit
7759ada396
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/github.com/go-xweb/httpsession/transfer.go

+ 1 - 0
src/github.com/go-xweb/httpsession/transfer.go

@@ -80,6 +80,7 @@ func (transfer *CookieTransfer) Set(req *http.Request, rw http.ResponseWriter, i
 			cookie.MaxAge = int(transfer.MaxAge / time.Second)
 			//cookie.Expires = time.Now().Add(transfer.maxAge)
 		}
+		cookie.Domain = transfer.Domain
 	}
 	http.SetCookie(rw, cookie)
 }