diff --git a/packages/strapi-plugin-rest-cache/server/utils/keys/generateHeadersKey.js b/packages/strapi-plugin-rest-cache/server/utils/keys/generateHeadersKey.js index f98c1dc53..0deeffe44 100644 --- a/packages/strapi-plugin-rest-cache/server/utils/keys/generateHeadersKey.js +++ b/packages/strapi-plugin-rest-cache/server/utils/keys/generateHeadersKey.js @@ -2,7 +2,7 @@ function generateHeadersKey(ctx, useHeaders = []) { return useHeaders - .filter((k) => ctx.request.header[k] !== undefined) + .filter((k) => ctx.request.header[k.toLowerCase()] !== undefined) .map((k) => `${k.toLowerCase()}=${ctx.request.header[k.toLowerCase()]}`) // headers are key insensitive .join(','); }