Browse Source

cookie修改

wangchuanjin 2 years ago
parent
commit
7759ada396
1 changed files with 1 additions and 0 deletions
  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.MaxAge = int(transfer.MaxAge / time.Second)
 			//cookie.Expires = time.Now().Add(transfer.maxAge)
 			//cookie.Expires = time.Now().Add(transfer.maxAge)
 		}
 		}
+		cookie.Domain = transfer.Domain
 	}
 	}
 	http.SetCookie(rw, cookie)
 	http.SetCookie(rw, cookie)
 }
 }