redirect
Este conteúdo não está disponível em sua língua ainda.
redirect(
url,status?):HttpResponse
Defined in: src/http/Route.ts:310
Redirect to a same-origin target — helper around Status.Found.
Only relative references pass (/dashboard, ../up, ?q=1, #top);
an absolute URL, a protocol-relative //host target, or a control
character throws HttpError(400). That default is the point: the
target is very often a request parameter, and the ?next= pattern with
no validation is the textbook open redirect — a phishing link bounces a
freshly authenticated victim to a look-alike host (#125). A framework
cannot force handlers to validate, so the helper they already reach for
validates instead.
Use redirectExternal when leaving the origin is the intent.
Parameters
Section titled “Parameters”string
status?
Section titled “status?”number = Status.Found
