diff --git a/awx/api/generics.py b/awx/api/generics.py index c51470c1a4..3118a86a20 100644 --- a/awx/api/generics.py +++ b/awx/api/generics.py @@ -109,6 +109,9 @@ class LoggedLoginView(auth_views.LoginView): class LoggedLogoutView(auth_views.LogoutView): + + success_url_allowed_hosts = settings.LOGOUT_ALLOWED_HOSTS + def dispatch(self, request, *args, **kwargs): original_user = getattr(request, 'user', None) ret = super(LoggedLogoutView, self).dispatch(request, *args, **kwargs) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index c829157323..5e5f8d886f 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -114,6 +114,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'public', 'media') MEDIA_URL = '/media/' LOGIN_URL = '/api/login/' +LOGOUT_ALLOWED_HOSTS = [] # Absolute filesystem path to the directory to host projects (with playbooks). # This directory should not be web-accessible.