mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-03-30 04:04:05 -04:00
register LoadAuthContext as Pre so that the auth context is aavailable other Pre middlewares
This commit is contained in:
@@ -46,9 +46,9 @@ func InitApi(app core.App) (*echo.Echo, error) {
|
||||
return !strings.HasPrefix(c.Request().URL.Path, "/api/")
|
||||
},
|
||||
}))
|
||||
e.Pre(LoadAuthContext(app))
|
||||
e.Use(middleware.Recover())
|
||||
e.Use(middleware.Secure())
|
||||
e.Use(LoadAuthContext(app))
|
||||
|
||||
// custom error handler
|
||||
e.HTTPErrorHandler = func(c echo.Context, err error) {
|
||||
|
||||
Reference in New Issue
Block a user