From 8e22eb1750bf928ca38618b7108d8b8ff930b2e4 Mon Sep 17 00:00:00 2001 From: Tue Nguyen <58532267+TueeNguyen@users.noreply.github.com> Date: Mon, 31 Jan 2022 12:35:01 -0500 Subject: [PATCH] Added Cache-Control to build status header (#2781) --- tools/autodeployment/builds.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/autodeployment/builds.js b/tools/autodeployment/builds.js index 84c81b9f03..c846e5a8e0 100644 --- a/tools/autodeployment/builds.js +++ b/tools/autodeployment/builds.js @@ -103,6 +103,7 @@ module.exports.addBuild = function (type, githubData, sha) { }; module.exports.buildStatusHandler = function handleStatus(req, res) { + res.setHeader('Cache-Control', 'no-cache'); res.json(builds); }; @@ -123,7 +124,7 @@ function handleBuildByName(buildName) { // If we have a build process, pipe that, otherwise we're done const pipeLog = () => (out ? out.pipe(res) : res.end()); - res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.writeHead(200, { 'Content-Type': 'text/plain', 'Cache-Control': 'no-cache' }); // Send the cached build log, which is either everything, or everything so far. // After we're done, pipe the rest of the log as it happens.