Skip to content

Commit

Permalink
Added Cache-Control to build status header (#2781)
Browse files Browse the repository at this point in the history
  • Loading branch information
TueeNguyen authored Jan 31, 2022
1 parent 058431d commit 8e22eb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/autodeployment/builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand All @@ -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.
Expand Down

0 comments on commit 8e22eb1

Please sign in to comment.