From 450c167461fbafbe824bc1f58d0189213766e919 Mon Sep 17 00:00:00 2001 From: Ali <83188384+testA113@users.noreply.github.com> Date: Wed, 29 Nov 2023 11:45:10 +1300 Subject: [PATCH] fix(cache): exclude reqs that accept yaml [EE-6381] (#10696) Co-authored-by: testa113 --- app/portainer/services/axios.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/portainer/services/axios.ts b/app/portainer/services/axios.ts index bb83c1d86..1a26de8b3 100644 --- a/app/portainer/services/axios.ts +++ b/app/portainer/services/axios.ts @@ -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') &&