1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

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

Co-authored-by: testa113 <testa113>
This commit is contained in:
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

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') &&