Skip to content

Commit

Permalink
fixed cookie value, added debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Jul 5, 2021
1 parent 2f0ed57 commit 32ac1d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,17 @@ 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))
}
}

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

Expand Down

0 comments on commit 32ac1d1

Please sign in to comment.