adjust healthcheck path and timeout

dev
Thomas Lynch 10 months ago
parent c3c04e4173
commit 2955531821
  1. 5
      healthcheck/worker.js

@ -51,11 +51,10 @@ async function doCheck(domainKey, hkey, record) {
const signal = controller.signal; const signal = controller.signal;
setTimeout(() => { setTimeout(() => {
controller.abort(); controller.abort();
}, 5000); }, 7000);
const host = isIPv4(record.ip) ? record.ip : `[${record.ip}]`; const host = isIPv4(record.ip) ? record.ip : `[${record.ip}]`;
const hostHeader = domainKey.substring(4, domainKey.length-1); const hostHeader = domainKey.substring(4, domainKey.length-1);
//await fetch(`https://${host}/.basedflare/cgi/trace`, { await fetch(`https://${host}/.basedflare/cgi/trace`, {
await fetch(`https://${host}/.basedflare/cgi/ping`, {
method: 'HEAD', method: 'HEAD',
redirect: 'manual', redirect: 'manual',
headers: { 'Host': hostHeader }, headers: { 'Host': hostHeader },

Loading…
Cancel
Save