Skip to content

Commit

Permalink
Set cacheTtl for the fetch request in the worker to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
awaitlink committed Sep 29, 2022
1 parent cf02b66 commit 066dee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worker/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function respond(origin, pathname, version, platform, extension, isAGzip)
url = "https://debuglogs.org/" + platform + "/" + version + "/" + key + extension;
}

const response = await fetch(url);
const response = await fetch(url, { cf: { cacheTtl: 0 } });

if (!response.ok || response.headers.get("content-length") === "243") { // Hacky, but this is the length that errors have.
return notFound(origin);
Expand Down

0 comments on commit 066dee8

Please sign in to comment.