Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Cache-Control to build status header #2781

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

TueeNguyen
Copy link
Contributor

Issue This PR Addresses

Fixes #2515

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

  • Added Cache-Control: no-cache to build status response header.

Testing

I'm not sure if the Cache-Control header is added to the response. In http://localhost/v1/status/build, checking the network tab, I don't see the Cache-Control header in the Response Headers
image

To run build log locally, change autodeploymentUrl in src\api\status\public\js\build-log\check-build-status.js

const autodeploymentUrl = (path) => `//dev.telescope.cdot.systems/deploy${path}`;  

Allow all connectSrc in src\api\status\src\server.js

connectSrc: ["'self'", "*"]

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@gitpod-io
Copy link

gitpod-io bot commented Jan 30, 2022

@@ -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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to the Object that has Content-Type below (i.e., we already have a spot to include it).

humphd
humphd previously approved these changes Jan 31, 2022
cindyorangis
cindyorangis previously approved these changes Jan 31, 2022
@TueeNguyen TueeNguyen merged commit 8e22eb1 into Seneca-CDOT:master Jan 31, 2022
@TueeNguyen TueeNguyen self-assigned this Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent client from caching /status response
3 participants