Skip to content

Commit

Permalink
fix: use basehref as cookie-path (argoproj#7105)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Münzl <[email protected]>
  • Loading branch information
jimtoniq authored Sep 3, 2021
1 parent d9e8a0f commit a512664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ func (a *ArgoCDServer) translateGrpcCookieHeader(ctx context.Context, w http.Res
}

func (a *ArgoCDServer) setTokenCookie(token string, w http.ResponseWriter) error {
cookiePath := fmt.Sprintf("path=/%s", strings.TrimRight(strings.TrimLeft(a.ArgoCDServerOpts.RootPath, "/"), "/"))
cookiePath := fmt.Sprintf("path=/%s", strings.TrimRight(strings.TrimLeft(a.ArgoCDServerOpts.BaseHRef, "/"), "/"))
flags := []string{cookiePath, "SameSite=lax", "httpOnly"}
if !a.Insecure {
flags = append(flags, "Secure")
Expand Down

0 comments on commit a512664

Please sign in to comment.