Skip to content

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

Type Method

redirectMiddleware(makePath:)

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

Parameters

makePath

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