use correct xsrf for session

This commit is contained in:
Umputun
2018-05-13 12:47:09 -05:00
parent f05655a1dc
commit 98d47ac0a5
+1 -1
View File
@@ -177,7 +177,7 @@ func (p Provider) authHandler(w http.ResponseWriter, r *http.Request) {
xsrfToken := p.randToken()
session.Values["xsrf_token"] = xsrfToken
xsrfCookie := http.Cookie{Name: "XSRF-TOKEN", Value: p.randToken(), HttpOnly: false, Path: "/",
xsrfCookie := http.Cookie{Name: "XSRF-TOKEN", Value: xsrfToken, HttpOnly: false, Path: "/",
MaxAge: 3600 * 24 * 365, Secure: true,
}
http.SetCookie(w, &xsrfCookie)