Protocol
Middleware
Middleware is placed between the server and your router. It is capable of mutating both incoming requests and outgoing responses. Middleware can choose to pass requests on to the next Middleware in a chain, or they can short circuit and return a custom Response if desired.@preconcurrency protocol Middleware : Sendable
Topics
Instance Methods
makeResponder(chainingTo:)Wraps aResponderin a singleMiddlewarecreating a newResponder.respond(to:chainingTo:)Called with eachRequestthat passes through this middleware.
Relationships
Inherits From
Swift.SendableSwift.SendableMetatype
Inherited By
AsyncAuthenticatorAsyncBasicAuthenticatorAsyncBearerAuthenticatorAsyncCredentialsAuthenticatorAsyncMiddlewareAsyncRequestAuthenticatorAsyncSessionAuthenticatorAuthenticatorBasicAuthenticatorBearerAuthenticatorCredentialsAuthenticatorRequestAuthenticatorSessionAuthenticator