From 50df58ff38f7ba6f3a01c5401802f1882ac847c9 Mon Sep 17 00:00:00 2001
From: "Brint E. Kriebel"
Date: Tue, 14 Jul 2026 13:31:45 -0700
Subject: [PATCH] Run DNS check against current domain
The pinging.net hosted domain does not allow the DNS checks to run from
an external domain due to CORS. Use the current URL location when
running the DNS check so it can be hosted from an external site.
---
README.md | 6 +++---
frontend/about.html | 6 +++---
frontend/index.ts | 6 +++++-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index cfb4c61..9c22b58 100644
--- a/README.md
+++ b/README.md
@@ -54,9 +54,9 @@ the request is also explicitly disabled. This test is run every 30 seconds.
### DNS Test
-Test DNS is working by making a HTTP GET request to a [random-number]dns-check.pinging.net.
-Caching is explicitly disabled and the random number part of the subdomain prevents common caching
-of the DNS lookup. This test is run every 30 seconds.
+Test DNS is working by making a HTTP GET request to a `[random-number]dns-check.`. Caching is explicitly disabled and the random number part of the subdomain prevents
+common caching of the DNS lookup. This test is run every 30 seconds.
### Browser Check
diff --git a/frontend/about.html b/frontend/about.html
index 5d872b9..acc3051 100644
--- a/frontend/about.html
+++ b/frontend/about.html
@@ -79,9 +79,9 @@ DNS Test
understands (e.g. 192.168.100.100).
- Test DNS is working by making a HTTP GET request to a [random-number]dns-check.pinging.net.
- Caching is explicitly disabled and the random number part of the subdomain prevents common
- caching of the DNS lookup. This test is run once when the page is loaded.
+ Test DNS is working by making a HTTP GET request to a [random-number]dns-check.<this site's
+ domain>. Caching is explicitly disabled and the random number part of the subdomain prevents
+ common caching of the DNS lookup. This test is run once when the page is loaded.
Browser Check
diff --git a/frontend/index.ts b/frontend/index.ts
index ff91b0c..5e99e3e 100644
--- a/frontend/index.ts
+++ b/frontend/index.ts
@@ -397,7 +397,11 @@ async function testHttpOrDns(testName: string) {
});
} else {
pong = fetch(
- "https://" + randomNumber + "dns-check.pinging.net/api/dns-check",
+ "https://" +
+ randomNumber +
+ "dns-check." +
+ window.location.hostname +
+ "/api/dns-check",
{
method: "GET",
cache: "no-store",