This makes separating middlewares from the core api easier.
As an example, the authorization middleware is moved to
it's own package.
Initialize all static middlewares when the server is created, reducing
allocations every time a route is wrapper with the middlewares.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 8d3467626ee26cad48ad84f2181552dce7afccb6
Component: engine
Removing direct dependencies from the server configuration.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1ba44a832f6aae811dfc6235287dd5b99e8aa94c
Component: engine