This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Description
Hi,
I integrated the strapi middleware cache to my project and added the model like categories. Below is my cache settings in middleware.js under config
cache: {
enabled: true,
type: 'redis',
maxAge: 3600000,
models: [
{
model: 'Categories',
maxAge: 1000000,
}
],
populateStrapiMiddleware: true,
logs:true
}
First time when GET /Categories api is invoked it asked for bearer token. Next time when it is cached authentication is totally ignored. If I remove auth header no forbidden message is shown instead data is returned giving access to anybody with api. Am I missing any steps? How to overcome this problem so that cache middleware is not invoked before auth is verified.