From 32ac1d1ddca88a81fa3d68435f81bd7287975fe9 Mon Sep 17 00:00:00 2001 From: Craig Johnston Date: Mon, 5 Jul 2021 14:54:05 -0700 Subject: [PATCH] fixed cookie value, added debug log --- proxy.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxy.go b/proxy.go index 38db6d0..496e030 100644 --- a/proxy.go +++ b/proxy.go @@ -98,7 +98,7 @@ func (p *Proxy) Handle(w http.ResponseWriter, r *http.Request) { tokenCookie, _ := r.Cookie(p.CookieTokenName) if tokenCookie != nil { r.Header.Add(TokenLocationHeader, "Cookie") - tokenString = tokenCookie.String() + tokenString = tokenCookie.Value p.Logger.Debug("Got token cookie", zap.String("cookie", tokenString)) } } @@ -106,6 +106,9 @@ func (p *Proxy) Handle(w http.ResponseWriter, r *http.Request) { if tokenString != "" { err := p.ProxyTokenHandler(r, tokenString) if err != nil { + p.Logger.Debug("ProxyTokenHandler Error", + zap.String("tokenString", tokenString), + zap.Error(err)) // fail admit = false