Skip to content

Commit

Permalink
fix: append slash to the end of ingress path (#702)
Browse files Browse the repository at this point in the history
There is a js file named `common.es-2015.xxx.js` in the portal of the
harbor 2.3.0, the request of this file will be transported to the core
component when there isn't a slash at the end of the ingress path,
the portal will not be accessible. So we need to append a slash to the end
of the ingress path.

Signed-off-by: He Weiwei <hweiwei@vmware.com>
  • Loading branch information
heww committed Jul 15, 2021
1 parent a0db41f commit 5b19aab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions controllers/goharbor/harbor/ingresses.go
Expand Up @@ -254,23 +254,23 @@ func (r *Reconciler) GetCoreIngressRuleValue(ctx context.Context, harbor *goharb
PathType: &pathTypePrefix,
Backend: portal,
}, {
Path: "/api",
Path: "/api/",
PathType: &pathTypePrefix,
Backend: core,
}, {
Path: "/service",
Path: "/service/",
PathType: &pathTypePrefix,
Backend: core,
}, {
Path: "/v2",
Path: "/v2", // distribution APIs will request to `/v2` so don't append slash for this ingress path
PathType: &pathTypePrefix,
Backend: core,
}, {
Path: "/chartrepo",
Path: "/chartrepo/",
PathType: &pathTypePrefix,
Backend: core,
}, {
Path: "/c",
Path: "/c/",
PathType: &pathTypePrefix,
Backend: core,
}},
Expand Down

0 comments on commit 5b19aab

Please sign in to comment.