Skip to content

Commit

Permalink
fix: remove 304 as the body is required
Browse files Browse the repository at this point in the history
  • Loading branch information
0oM4R committed Dec 8, 2024
1 parent 9c67026 commit 11a4a4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/stats/nginx/njs/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function getStats(r) {
return;
}

r.return(304, JSON.stringify(cachedData.summary));
r.return(200, JSON.stringify(cachedData.summary));
}

async function updateStats(r) {
Expand All @@ -30,7 +30,7 @@ async function updateStats(r) {
r.error(`Failed to fetch stats: ${error}`);
r.error(`Returning cached data`);
const cachedData = cache.readCache(cache_path);
r.return(304, JSON.stringify(cachedData.summary));
r.return(200, JSON.stringify(cachedData.summary));
return;
}
}
Expand Down

0 comments on commit 11a4a4f

Please sign in to comment.