From cb93aab6641f8a38bf42c260fd0ca3c425ec05df Mon Sep 17 00:00:00 2001 From: Umputun Date: Mon, 21 May 2018 23:47:58 -0500 Subject: [PATCH] fix protocol mismatch for jwt logout --- app/rest/auth/jwt.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/rest/auth/jwt.go b/app/rest/auth/jwt.go index dc5163d4..63c6d482 100644 --- a/app/rest/auth/jwt.go +++ b/app/rest/auth/jwt.go @@ -132,10 +132,10 @@ func (j *JWT) Refresh(w http.ResponseWriter, r *http.Request) (*CustomClaims, er // Reset token's cookies func (j *JWT) Reset(w http.ResponseWriter) { jwtCookie := http.Cookie{Name: jwtCookieName, Value: "", HttpOnly: false, Path: "/", - MaxAge: -1, Expires: time.Unix(0, 0), Secure: true} + MaxAge: -1, Expires: time.Unix(0, 0), Secure: j.secureCookies} http.SetCookie(w, &jwtCookie) xsrfCookie := http.Cookie{Name: xsrfCookieName, Value: "", HttpOnly: false, Path: "/", - MaxAge: -1, Expires: time.Unix(0, 0), Secure: true} + MaxAge: -1, Expires: time.Unix(0, 0), Secure: j.secureCookies} http.SetCookie(w, &xsrfCookie) }