RedirectBlockedError
Thrown when a redirect target is not allowed (an open-redirect attempt or a misconfiguration).
Thrown when a redirect target is not allowed (an open-redirect attempt or a misconfiguration).
The handler reports it and answers 500; the target never reaches a Location header.
Import#
ts
import { RedirectBlockedError } from "@shadow-js/dusk/server";
Signature#
ts
class RedirectBlockedError extends Error
Members#
| Name | Type | Description |
|---|---|---|
code |
readonly code |
Examples#
ts
checkRedirectTarget("//evil.example", policy) instanceof RedirectBlockedError; // true