修改重定向

This commit is contained in:
duanhf2012
2020-01-02 14:29:28 +08:00
parent e2a7fc75ee
commit 714a76cc50

View File

@@ -468,9 +468,11 @@ func (slf *HttpRespone) Redirect(url string,cookieList []*http.Cookie) {
func (slf *HttpRespone) redirects(w *http.ResponseWriter, req *http.Request) {
if slf.RedirectData.CookieList != nil {
for _,v := range slf.RedirectData.CookieList{
req.AddCookie(v)
//req.AddCookie(v)
http.SetCookie(*w,v)
}
}
//http.SetCookie()
http.Redirect(*w, req, slf.RedirectData.Url,
// see @andreiavrammsd comment: often 307 > 301