1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-11-24 23:24:00 +02:00

added eagerRequestDataCache middleware

This commit is contained in:
Gani Georgiev
2023-04-15 14:44:07 +03:00
parent 177230a765
commit 6127350e91
3 changed files with 103 additions and 0 deletions

View File

@@ -121,6 +121,10 @@ func InitApi(app core.App) (*echo.Echo, error) {
return nil, err
}
// note: it is after the OnBeforeServe hook to ensure that the implicit
// cache is after any user custom defined middlewares
e.Use(eagerRequestDataCache(app))
// catch all any route
api.Any("/*", func(c echo.Context) error {
return echo.ErrNotFound