Ir al contenido
Español

redirectExternal

Esta página aún no está disponible en tu idioma.

redirectExternal(url, status?): HttpResponse

Defined in: src/http/Route.ts:329

Redirect to a target that may leave this origin — the audited opt-in to redirect’s same-origin rule.

Being a separate function is the whole design: grep redirectExternal enumerates every deliberate off-origin hop in a codebase, which a boolean tucked into a third argument never could. Pass a constant or a value you allowlisted yourself — never a raw request parameter, which is precisely the open redirect redirect refuses.

Control characters are still rejected: those are a header-injection vector, not a question of origin.

string

number = Status.Found

HttpResponse