mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-23 21:16:14 +00:00
feat(sso/server): redirect to login for wildcard handler
This commit is contained in:
@@ -6,6 +6,7 @@ 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"
|
||||
)
|
||||
|
||||
@@ -44,7 +45,7 @@ func (s *SSOServer) LogoutLocal(w http.ResponseWriter, r *http.Request) {
|
||||
s.Standalone.LogoutLocal(w, r)
|
||||
}
|
||||
|
||||
// Wildcard returns HTTP 404 Not Found.
|
||||
// Wildcard redirects all requests to the login endpoint.
|
||||
func (s *SSOServer) Wildcard(w http.ResponseWriter, r *http.Request) {
|
||||
http.NotFound(w, r)
|
||||
http.Redirect(w, r, paths.OAuth2+paths.Login, http.StatusTemporaryRedirect)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user