This commit is contained in:
xing 2022-11-08 17:49:10 +08:00
parent ec2aa30eb6
commit 67b48b36a8

View File

@ -54,6 +54,9 @@ func PostComment(c *gin.Context) {
return return
} }
if res.StatusCode == http.StatusFound { 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") u := res.Header.Get("Location")
up, err := url.Parse(u) up, err := url.Parse(u)
if err != nil { if err != nil {