register LoadAuthContext as Pre so that the auth context is aavailable other Pre middlewares
This commit is contained in:
parent
54a6ae6710
commit
c3f7aeb856
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue