From bf9c902defa0e9cb87c9c6b03722c50f1de5c350 Mon Sep 17 00:00:00 2001 From: xing Date: Thu, 10 Nov 2022 20:53:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- actions/comment.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/actions/comment.go b/actions/comment.go index c8de7bb..379b036 100644 --- a/actions/comment.go +++ b/actions/comment.go @@ -8,6 +8,7 @@ import ( "github/fthvgb1/wp-go/actions/common" "github/fthvgb1/wp-go/cache" "github/fthvgb1/wp-go/config" + "github/fthvgb1/wp-go/helper" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/mail" "github/fthvgb1/wp-go/models/wp" @@ -83,6 +84,9 @@ func PostComment(c *gin.Context) { return } newReq.Host = home.Host + newReq.Header.Set("Cookie", strings.Join(helper.SliceMap(c.Request.Cookies(), func(t *http.Cookie) string { + return fmt.Sprintf("%s=%s", t.Name, t.Value) + }), "; ")) ress, er := http.DefaultClient.Do(newReq) if er != nil { err = er