disable fetch cache

This commit is contained in:
lyc8503 committed 2023-10-17 01:11:28 +08:00
1 parent 7b85b89325
commit 1f4900b143
4 files changed
+25 -41

No files matched your search

+6 -1
View File
@@ -50,7 +50,12 @@ async function getStatus(monitor: MonitorTarget): Promise<{ ping: number; up: bo
const response = await fetchTimeout(monitor.target, monitor.timeout || 10000, {
method: monitor.method,
headers: monitor.headers,
body: monitor.body
body: monitor.body,
cf: {
cacheTtlByStatus: {
'100-599': -1 // Don't cache any status code, from https://developers.cloudflare.com/workers/runtime-apis/request/#requestinitcfproperties
}
}
})
console.log(`${monitor.name} responded with ${response.status}`)