Skip to content

Commit

Permalink
fix infinite redirects in policy based auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhaoxx committed Feb 14, 2024
1 parent efa5e75 commit 46249d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/policybase.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (mgr *policyBaseAuth) HandleAuth(ctx *http.HttpCtx) AuthRet {
cookies := strings.Split(cookie, ";")
for j, item := range cookies {
if strings.Contains(item, verfiyCookieKey+"=") {
token = strings.TrimPrefix(item, verfiyCookieKey+"=")
token = strings.TrimPrefix(strings.TrimSpace(item), verfiyCookieKey+"=")
cookies = append(cookies[:j], cookies[j+1:]...)
exists = true
break
Expand Down

0 comments on commit 46249d0

Please sign in to comment.