pub enum RedirectPolicy {
Deny,
Follow,
}Expand description
Redirect handling for native HTTP requests and the WebSocket handshake.
Variants§
Deny
Never follow a 3xx. A redirected request would replay configured
headers, URL userinfo, or a signed capability to an unverified
destination, so refusal is the default. A refused redirect surfaces
transport.redirect.
Follow
Follow a redirect for a request that carries neither configured headers, base-URL userinfo, nor a signed capability URL. A credential-bearing request is still refused even under this policy, because ureq forwards configured headers and URL userinfo to the redirect target, and tungstenite forwards configured headers to a WebSocket redirect target. A WebSocket handshake additionally may not follow a redirect when its realtime URL carries userinfo or a query (a signed capability). Enable only for a deployment whose unauthenticated requests may safely move.