Skip to content

You're viewing documentation for a pre-release version. View the latest stable version

Macro

Middleware(_:body:)

Groups route handlers with middleware inside a @Controller. Use the using: overload when the middleware needs controller dependencies.
@freestanding(declaration) macro Middleware(_ middleware: any Middleware..., body: () -> Void)