From 0bbf4d66a8dcfc7fc3734fd13cfaf897ee31cd34 Mon Sep 17 00:00:00 2001 From: sneak Date: Mon, 23 Feb 2026 01:01:50 +0700 Subject: [PATCH] Switch from HEAD to GET for latency measurement Hetzner speed test servers drop the connection on HEAD requests, causing fetch to throw a network error. GET works universally and with no-cors mode the response is opaque anyway. --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 877592d..45c41f9 100644 --- a/src/main.js +++ b/src/main.js @@ -125,7 +125,7 @@ async function detectGateway() { const timeoutId = setTimeout(() => controller.abort(), 1500); try { await fetch(url, { - method: "HEAD", + method: "GET", mode: "no-cors", cache: "no-store", signal: controller.signal, @@ -240,7 +240,7 @@ async function measureLatency(url) { try { await fetch(targetUrl.toString(), { - method: "HEAD", + method: "GET", mode: "no-cors", cache: "no-store", signal: controller.signal,