Conversation
|
Pinging @elastic/kibana-app-arch (Team:AppArch) |
|
@elastic/kibana-app-arch why did |
| body, | ||
| headers: { | ||
| 'content-type': contentType, | ||
| 'cache-control': 'private, no-cache, no-store', |
There was a problem hiding this comment.
note: the default cache control headers will apply to these custom responses as well. The existing SAML and OIDC functional tests will continue to assert this.
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
src/plugins/bfetch/server/plugin.ts
Outdated
| Connection: 'keep-alive', | ||
| 'Transfer-Encoding': 'chunked', | ||
| 'Cache-Control': 'no-cache', | ||
| 'Cache-Control': 'private, no-cache, no-store, must-revalidate', |
There was a problem hiding this comment.
As it's now the default value, can't this line just be removed?
| cache: { | ||
| privacy: 'private', | ||
| otherwise: 'private, no-cache, no-store, must-revalidate', | ||
| }, |
There was a problem hiding this comment.
I see you added server_integration tests for it, but maybe we should also add a test for this in src/core/server/http/integration_tests/router.test.ts to check that 1/ this is the default value and 2/ route handlers can still override it?
| */ | ||
|
|
||
| // eslint-disable-next-line import/no-default-export | ||
| export default function({ getService }) { |
There was a problem hiding this comment.
NIT: file could probably be in TS instead of JS.
There was a problem hiding this comment.
I explored this, but in order to get really any benefit from the conversion, we also need to convert all of the server_integration services as well, and the type definitions for supertest are out of date (and essentially EOL), which is the only real external dependency, so I decided not to do the conversion as part of this PR
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* update cache-control header * update tests * update test run config * remove custom cache-control header for authentication resources * address test flakiness * address PR feedback * revert changes to endpoint test * revert changes for real this time Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* update cache-control header * update tests * update test run config * remove custom cache-control header for authentication resources * address test flakiness * address PR feedback * revert changes to endpoint test * revert changes for real this time Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This updates the default
Cache-Controlheader to respond withprivate, no-cache, no-store, must-revalidate. The previous default header value wasno-cache. Individual routes can still choose to respond with a custom cache-control header if they wish to do so.Resolves #8530
Resolves #58169