mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 12:15:20 +01:00
Merge pull request #10879 from reasonerjt/oidc-filter-update-v2
CLI Secret should handle /v2/* API
This commit is contained in:
commit
48163f2666
@ -209,6 +209,7 @@ type oidcCliReqCtxModifier struct{}
|
|||||||
func (oc *oidcCliReqCtxModifier) Modify(ctx *beegoctx.Context) bool {
|
func (oc *oidcCliReqCtxModifier) Modify(ctx *beegoctx.Context) bool {
|
||||||
path := ctx.Request.URL.Path
|
path := ctx.Request.URL.Path
|
||||||
if path != "/service/token" &&
|
if path != "/service/token" &&
|
||||||
|
!strings.HasPrefix(path, "/v2") &&
|
||||||
!strings.HasPrefix(path, "/chartrepo/") &&
|
!strings.HasPrefix(path, "/chartrepo/") &&
|
||||||
!strings.HasPrefix(path, fmt.Sprintf("/api/%s/chartrepo/", api.APIVersion)) {
|
!strings.HasPrefix(path, fmt.Sprintf("/api/%s/chartrepo/", api.APIVersion)) {
|
||||||
log.Debug("OIDC CLI modifier only handles request by docker CLI or helm CLI")
|
log.Debug("OIDC CLI modifier only handles request by docker CLI or helm CLI")
|
||||||
|
Loading…
Reference in New Issue
Block a user