diff --git a/.gitignore b/.gitignore index a3e39cb09..a513a443e 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ content.log cloudflared.exe public/assets/ access.log +debugLogs/ diff --git a/server.js b/server.js index b0e424792..4fd3ce569 100644 --- a/server.js +++ b/server.js @@ -5274,7 +5274,7 @@ app.post('/asset_download', jsonParser, async (request, response) => { try { // Download to temp const res = await fetch(url); - if (!res.ok) { + if (!res.ok || res.body === null) { throw new Error(`Unexpected response ${res.statusText}`); } const destination = path.resolve(temp_path);