From 5cdafb8bc9c97d673a5729026db4480f94ff2849 Mon Sep 17 00:00:00 2001 From: Colby Gutierrez-Kraybill Date: Tue, 9 May 2023 17:16:37 -0400 Subject: [PATCH] Handle generic ipban redirect if session says so --- src/redux/session.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/redux/session.js b/src/redux/session.js index e592465c5..162b230e7 100644 --- a/src/redux/session.js +++ b/src/redux/session.js @@ -13,6 +13,7 @@ const Types = keyMirror({ }); const banGoodListPaths = [ + '/ip_ban_appeal', '/vpn_required', '/accounts/banned-response', '/community_guidelines', @@ -72,6 +73,13 @@ const handleSessionResponse = (dispatch, body) => { ) { window.location = '/vpn_required/'; return; + } else if ( + body.banned && + body.redirectURL && + banGoodListPaths.every(goodPath => window.location.pathname.indexOf(goodPath) === -1) + ) { + window.location = body.redirectURL; + return; } else if ( body.user && body.user.banned &&