Skip to content

Commit

Permalink
Added Cache-Control to build status header
Browse files Browse the repository at this point in the history
  • Loading branch information
TueeNguyen committed Jan 30, 2022
1 parent 64ff08d commit 306f61d
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 @@ -105,6 +105,7 @@ module.exports.addBuild = function (type, githubData) {
};

module.exports.buildStatusHandler = function handleStatus(req, res) {
res.setHeader('Cache-Control', 'no-cache');
res.json(builds);
};

Expand All @@ -124,7 +125,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.setHeader('Cache-Control', 'no-cache');
res.writeHead(200, { 'Content-Type': 'text/plain' });

// Send the cached build log, which is either everything, or everything so far.
Expand Down

0 comments on commit 306f61d

Please sign in to comment.