You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the only option listed is not in the example of implementation and doesn't seem to work in my installation of strapi (witch is not up to the last realese of V5)
I infer that it should look like that in config/middlewares.ts:
{
name: 'strapi::public',
config: {
maxAge: 86400000 // 1 day in milliseconds
},
},
but for me it does not work
I have no clue what should i do
Additional context
No response
Suggested improvements or fixes
No response
Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered:
Hi @hugzenfeu!
Sorry you're having trouble with this.
The public middleware is based on koa-static and indeed the docs might be slightly outdated. Looking at the available configuration options for koa-static, maybe maxAge should be used as maxage? 🤔 By the way the example is just to give you an idea of what you could use (given all the options available in koa-static), but I agree it might look inconsistent with the table.
I'll check with Strapi core engineers and get back to you.
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/configurations/middlewares#public:~:text=any%20configuration%20options.-,public,The,-public%20middleware%20is
Describe the bug
the only option listed is not in the example of implementation and doesn't seem to work in my installation of strapi (witch is not up to the last realese of V5)
I infer that it should look like that in config/middlewares.ts:
but for me it does not work
I have no clue what should i do
Additional context
No response
Suggested improvements or fixes
No response
Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered: