-
Notifications
You must be signed in to change notification settings - Fork 27
feat: enable support of custom routes and models from plugins #43
feat: enable support of custom routes and models from plugins #43
Conversation
|
Hey @stafyniaksacha, I'm loving this ❤️ ! Some thoughts:
FYI: I'm on the strapi slack if you need anything |
|
Any update on this? |
|
Hello @gfragioud ! I plan to work on the next version during the next week to support Strapi V4 Edit: I also plan to create a real documentation for the plugin, more info coming on next week ;) |
withKoaContextorwithStrapiMiddlewareoptionsno breaking changes are present in middleware options
strapi > 3.4.0 required
New features
Associate custom
routesto a model cache configurationGETrequests are cachedPOST,PUT,PATCHandDELETErequests are used to purge related cacheBy default
routesare populated with the public api routes.To disable this behaviour add
injectDefaultRoutes: falseto the model cache configurationCache is not looked up if
AuthorizationorCookieheader are present.To dissable this behaviour add
hitpass: falseto the model cache configurationAssociate a model with a
pluginInternal refactor
Options
Middleware default options
Model default options
New API
🚧 Request for comments
Feel free to provide feedback
Todo
clearCacheRegExp refactorgetRelatedModelsrefactorcache-controlresponse header ?hitpassrequests ? (see Varnish diagram)