From ab2a8b6fecf3e110f8c0cbd0dcc3cfa035bd4515 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Sat, 29 Apr 2023 08:52:41 +0200 Subject: [PATCH] fix(handler/sso/proxy): redirect callback requests to login --- pkg/handler/handler_sso_proxy.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/handler/handler_sso_proxy.go b/pkg/handler/handler_sso_proxy.go index 2fa7de9..7485d7c 100644 --- a/pkg/handler/handler_sso_proxy.go +++ b/pkg/handler/handler_sso_proxy.go @@ -133,7 +133,9 @@ func (s *SSOProxy) Login(w http.ResponseWriter, r *http.Request) { } func (s *SSOProxy) LoginCallback(w http.ResponseWriter, r *http.Request) { - http.NotFound(w, r) + ingressPath := s.GetPath(r) + login := url.LoginRelative(ingressPath, ingressPath) + http.Redirect(w, r, login, http.StatusFound) } func (s *SSOProxy) Logout(w http.ResponseWriter, r *http.Request) {