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

Send Cache-Control: no-cache for most routes #6937

Merged
merged 4 commits into from
Mar 23, 2023
Merged

Send Cache-Control: no-cache for most routes #6937

merged 4 commits into from
Mar 23, 2023

Conversation

fm3
Copy link
Member

@fm3 fm3 commented Mar 21, 2023

Adds Cache-Control: no-cache header to most routes.
Routes that go via the box-to-result codepath get it there.
Routes that don’t do that now have an explicit addNoCacheHeaderFallback wrapper.
Asset routes are not affected, neither are routes that already set the Cache-Control header in their implementation (e.g. thumbnail route)
Note that routes rejected by silhouette with 401 unauthenticated will not have the header set. But I assume no reasonable browser caches 401 responses anyway.

URL of deployed dev instance (used for testing):

Steps to test:

  • In browser’s network tab, check that api responses have the header as expected, but asset responses don’t.

Issues:


  • Needs datastore update after deployment

@fm3 fm3 self-assigned this Mar 21, 2023
@fm3 fm3 requested a review from normanrz March 23, 2023 10:34
@fm3 fm3 marked this pull request as ready for review March 23, 2023 10:34
@fm3 fm3 merged commit d73434a into master Mar 23, 2023
@fm3 fm3 deleted the no-cache branch March 23, 2023 10:56
hotzenklotz added a commit that referenced this pull request Mar 23, 2023
…wings

* 'master' of github.com:scalableminds/webknossos:
  Add email notifications for processing jobs (#6918)
  Send Cache-Control: no-cache for most routes (#6937)
hotzenklotz added a commit that referenced this pull request Mar 23, 2023
…pdown-menu

* 'master' of github.com:scalableminds/webknossos:
  Add email notifications for processing jobs (#6918)
  Send Cache-Control: no-cache for most routes (#6937)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doublecheck cache control headers for dataset and annotation info request
2 participants