Skip to content

Type Method

redirectMiddleware(makePath:)

Basic middleware to redirect unauthenticated requests to the supplied path
@preconcurrency static func redirectMiddleware(makePath: @escaping @Sendable (Request) -> String) -> any Middleware

Parameters

makePath

The closure that returns the redirect path based on the given Request object