diff --git a/app/assets/javascripts/discourse/app/lib/logout.js b/app/assets/javascripts/discourse/app/lib/logout.js index 637d85764db..a2018e4ce45 100644 --- a/app/assets/javascripts/discourse/app/lib/logout.js +++ b/app/assets/javascripts/discourse/app/lib/logout.js @@ -11,6 +11,6 @@ export default function logout({ redirect } = {}) { window.location.href = redirect; return; } - - window.location.href = getURL("/"); + const url = ctx.siteSettings.login_required ? "/login" : "/"; + window.location.href = getURL(url); }