Skip to content

Commit

Permalink
Proxy userpreferences to Rancher
Browse files Browse the repository at this point in the history
Signed-off-by: futuretea <Hang.Yu@suse.com>
  • Loading branch information
futuretea authored and gitlawr committed Jun 16, 2021
1 parent 6d5c7df commit 03ecd27
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/server/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ func (r *Router) Routes(h router.Handlers) http.Handler {
if err != nil {
logrus.Fatal(err)
}
v3Handler := &proxy.Handler{
rancherHandler := &proxy.Handler{
Host: host,
}
m.PathPrefix("/v3-public/").Handler(v3Handler)
m.PathPrefix("/v3/").Handler(v3Handler)
m.PathPrefix("/v3-public/").Handler(rancherHandler)
m.PathPrefix("/v3/").Handler(rancherHandler)
m.PathPrefix("/v1/userpreferences").Handler(rancherHandler)
}

m.NotFoundHandler = router.Routes(h)
Expand Down

0 comments on commit 03ecd27

Please sign in to comment.