From 86916a94de2eae8577e99124614a32de531851e5 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 10 Nov 2020 16:49:59 -0800 Subject: [PATCH] allow 401 and 403 errors to pass health check way too many WP sites use some plugin to block health check routes. maybe some day we will have dynamic health check route settable by user. --- src/apphealthmonitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apphealthmonitor.js b/src/apphealthmonitor.js index 78788db36..cd335c806 100644 --- a/src/apphealthmonitor.js +++ b/src/apphealthmonitor.js @@ -96,7 +96,7 @@ function checkAppHealth(app, callback) { .end(function (error, res) { if (error && !error.response) { setHealth(app, apps.HEALTH_UNHEALTHY, callback); - } else if (res.statusCode >= 400) { // 2xx and 3xx are ok + } else if (res.statusCode >= 403) { // 2xx and 3xx are ok. even 401 and 403 are ok for now (for WP sites) setHealth(app, apps.HEALTH_UNHEALTHY, callback); } else { setHealth(app, apps.HEALTH_HEALTHY, callback);