From bab62c072b209ffac45780f01791b9a506ee525e Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Thu, 13 Apr 2023 14:20:38 +0200 Subject: [PATCH] feat(handler/sso/server): return not found instead of redirect for wildcard handler --- pkg/handler/handler_sso_server.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/handler/handler_sso_server.go b/pkg/handler/handler_sso_server.go index 8b70b19..eb3f4f8 100644 --- a/pkg/handler/handler_sso_server.go +++ b/pkg/handler/handler_sso_server.go @@ -6,7 +6,6 @@ import ( "github.com/nais/wonderwall/pkg/config" "github.com/nais/wonderwall/pkg/cookie" "github.com/nais/wonderwall/pkg/router" - "github.com/nais/wonderwall/pkg/router/paths" "github.com/nais/wonderwall/pkg/url" ) @@ -45,7 +44,7 @@ func (s *SSOServer) LogoutLocal(w http.ResponseWriter, r *http.Request) { s.Standalone.LogoutLocal(w, r) } -// Wildcard redirects all requests to the login endpoint. +// Wildcard returns HTTP 404 Not Found. func (s *SSOServer) Wildcard(w http.ResponseWriter, r *http.Request) { - http.Redirect(w, r, paths.OAuth2+paths.Login, http.StatusTemporaryRedirect) + http.NotFound(w, r) }