From 03ecd279b0a8e3334fa485ab72bed2630c3b91d2 Mon Sep 17 00:00:00 2001 From: futuretea Date: Wed, 16 Jun 2021 11:04:20 +0800 Subject: [PATCH] Proxy userpreferences to Rancher Signed-off-by: futuretea --- pkg/server/router.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/server/router.go b/pkg/server/router.go index 3721c960a0..a36414fe72 100644 --- a/pkg/server/router.go +++ b/pkg/server/router.go @@ -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)