diff --git a/internal/controlplane/handlers_oauth.go b/internal/controlplane/handlers_oauth.go index e0aab715ab..1e800beec6 100644 --- a/internal/controlplane/handlers_oauth.go +++ b/internal/controlplane/handlers_oauth.go @@ -195,7 +195,7 @@ func (s *Server) alllowedRedirectURL(redirectUrl *url.URL) bool { if redirectUrl == nil || redirectUrl.String() == "" { return true // Empty URL is allowed } - if redirectUrl.Host == "localhost" { + if redirectUrl.Hostname() == "localhost" { return true } hostUrl, err := redirectUrl.Parse("/")