GeminiBot
commited on
Commit
·
180dac8
1
Parent(s):
afd22b0
Fix VQD detection in diagnostics
Browse files- src/server.ts +6 -4
src/server.ts
CHANGED
|
@@ -131,10 +131,12 @@ const server = createServer(async (req: IncomingMessage, res: ServerResponse) =>
|
|
| 131 |
const ipRes = await fetch("https://api.ipify.org?format=json");
|
| 132 |
const ipData = await ipRes.json() as any;
|
| 133 |
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
|
|
|
|
|
|
| 138 |
report.checks.duckduckgo = {
|
| 139 |
status: res.status,
|
| 140 |
latency_ms: Date.now() - start,
|
|
|
|
| 131 |
const ipRes = await fetch("https://api.ipify.org?format=json");
|
| 132 |
const ipData = await ipRes.json() as any;
|
| 133 |
|
| 134 |
+
const res = await fetch("https://duckduckgo.com/duckchat/v1/status?q=1", {
|
| 135 |
+
headers: {
|
| 136 |
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36",
|
| 137 |
+
"x-vqd-accept": "1"
|
| 138 |
+
}
|
| 139 |
+
}); const hash = res.headers.get("x-vqd-hash-1");
|
| 140 |
report.checks.duckduckgo = {
|
| 141 |
status: res.status,
|
| 142 |
latency_ms: Date.now() - start,
|