From 61b2cc990f48e3f4bc460e7a1320a76dea491a16 Mon Sep 17 00:00:00 2001 From: ManeraKai Date: Wed, 13 Apr 2022 23:51:23 +0300 Subject: [PATCH] Added 502 for auto redirecting #99 --- src/pages/background/background.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/background/background.js b/src/pages/background/background.js index db05d59..3edfa2e 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -175,7 +175,8 @@ browser.webRequest.onResponseStarted.addListener( details => { if (!generalHelper.getAutoRedirect()) return null; - if (details.type == 'main_frame' && (details.statusCode == 503 || details.statusCode == 504)) { + console.log('details.statusCode', details.statusCode); + if (details.type == 'main_frame' && (details.statusCode == 502 || details.statusCode == 503 || details.statusCode == 504)) { // if (details.type == 'main_frame' && details.statusCode >= 200) { // console.log("statusCode", details.statusCode); const url = new URL(details.url);