diff --git a/src/components/services/ping.jsx b/src/components/services/ping.jsx
index e30562323..7358b172f 100644
--- a/src/components/services/ping.jsx
+++ b/src/components/services/ping.jsx
@@ -25,7 +25,7 @@ export default function Ping({ service }) {
const statusText = `${service.ping}: HTTP status ${data.status}`;
- if (data && data.status !== 200) {
+ if (data.status > 403) {
return (
{data.status}
@@ -33,12 +33,10 @@ export default function Ping({ service }) {
);
}
- if (data && data.status === 200) {
- return (
-
-
{t("common.ms", { value: data.latency, style: "unit", unit: "millisecond", unitDisplay: "narrow", maximumFractionDigits: 0 })}
-
- );
- }
+ return (
+
+
{t("common.ms", { value: data.latency, style: "unit", unit: "millisecond", unitDisplay: "narrow", maximumFractionDigits: 0 })}
+
+ );
}
diff --git a/src/pages/api/ping.js b/src/pages/api/ping.js
index 66eab281c..1fdb1f804 100644
--- a/src/pages/api/ping.js
+++ b/src/pages/api/ping.js
@@ -21,7 +21,7 @@ export default async function handler(req, res) {
});
let endTime = performance.now();
- if (status >= 400) {
+ if (status > 403) {
// try one more time as a GET in case HEAD is rejected for whatever reason
startTime = performance.now();
[status] = await httpProxy(pingURL);