From 67b48b36a8a87779781f0ed2c826acf8deb1b066 Mon Sep 17 00:00:00 2001 From: xing Date: Tue, 8 Nov 2022 17:49:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actions/comment.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/comment.go b/actions/comment.go index 44fb59f..b02642a 100644 --- a/actions/comment.go +++ b/actions/comment.go @@ -54,6 +54,9 @@ func PostComment(c *gin.Context) { return } if res.StatusCode == http.StatusFound { + for _, cookie := range res.Cookies() { + c.SetCookie(cookie.Name, cookie.Value, cookie.MaxAge, cookie.Path, cookie.Domain, cookie.Secure, cookie.HttpOnly) + } u := res.Header.Get("Location") up, err := url.Parse(u) if err != nil {