fix(cache): exclude reqs that accept yaml [EE-6381] (#10696)

Co-authored-by: testa113 <testa113>
pull/10704/head
Ali 2023-11-29 11:45:10 +13:00 committed by GitHub
parent bdcb003a32
commit 450c167461
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -24,6 +24,11 @@ export const cache = setupCache({
return true;
}
// exclude caching get with yaml accept header
if (req.headers?.Accept.includes('application/yaml')) {
return true;
}
// exclude caching post requests unless the path contains 'selfsubjectaccessreview'
if (
!req.url?.includes('selfsubjectaccessreview') &&