Type Method
redirect(to:redirectType:)
Creates a redirecting
Abort error.Parameters
locationThe path to redirect to
redirectTypeThe type of redirect to perform
Return Value
An abort error that provides a redirect to the specified location
Discussion
throw Abort.redirect(to: "https://vapor.codes")
Set type to ‘.permanently’ to allow caching to automatically redirect from browsers. Defaulting to non-permanent to prevent unexpected caching.