Fix condition for OIDC security filter (#7645)

Signed-off-by: Daniel Jiang <jiangd@vmware.com>
This commit is contained in:
Daniel Jiang 2019-05-06 16:30:09 +08:00 committed by Wang Yan
parent 26799fc7f4
commit 45210f7c40

View File

@ -228,7 +228,7 @@ type oidcCliReqCtxModifier struct{}
func (oc *oidcCliReqCtxModifier) Modify(ctx *beegoctx.Context) bool {
path := ctx.Request.URL.Path
if path != "/service/token" || strings.HasPrefix(path, "/chartrepo/") {
if path != "/service/token" && !strings.HasPrefix(path, "/chartrepo/") {
log.Debug("OIDC CLI modifer only handles request by docker CLI or helm CLI")
return false
}