Static Methodvapor 4.114.1Vapor

redirectMiddleware(makePath:)

Basic middleware to redirect unauthenticated requests to the supplied path

RedirectMiddleware.swift:16
@preconcurrency static func redirectMiddleware(makePath: @escaping (Request) -> String) -> Middleware

Parameters

makePath

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