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

Add no-store to the Cache-Control header on auth responses #916

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JackLewis-digirati
Copy link
Contributor

@JackLewis-digirati JackLewis-digirati commented Nov 14, 2024

Related to #833

This PR adds a Cache-Control header of no-cache,no-store to the following endpoints:

  • auth/{customer}/clickthrough
  • auth/{customer}/token
  • auth/{customer}/{authService}
  • auth/{customer}/{authService}/logout

This should help to avoid issues where auth responses are cached incorrectly

NOTE: this header has not been added to auth/v2/probe/{customer}/{space}/{image} as this resource already has a Cache-Control value of private

Copy link
Member

@donaldgray donaldgray left a comment

Choose a reason for hiding this comment

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

As the issue that we encountered is related to the AccessTokenResponse - is it worth adding tests to confirm the appropriate headings are set there? Would pick up if the attribute was somehow removed

@JackLewis-digirati JackLewis-digirati changed the title Add no-store and no-cache to the Cache-Control header on auth responses Add no-store and no-cache to the Cache-Control header on successful auth responses Nov 14, 2024
@garyttierney
Copy link
Member

Btw, no-cache,no-store is equivalent to no-store https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#use_cases

@JackLewis-digirati
Copy link
Contributor Author

should be changed to use just no-store - thanks Gary

@JackLewis-digirati JackLewis-digirati changed the title Add no-store and no-cache to the Cache-Control header on successful auth responses Add no-store to the Cache-Control header on auth responses Nov 14, 2024
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.

3 participants