Skip to main content

start_https_redirect

Function start_https_redirect 

Source
pub async fn start_https_redirect(bind_addr: &str) -> Result<JoinHandle<()>>
Expand description

Start a standalone HTTP-to-HTTPS redirect listener using the default policy.

The default policy intentionally has no allowed host, so this function returns a configuration error until a caller chooses a canonical host (or uses HttpsRedirectHandler::start after adding an allowlist). Keeping exposing this helper keeps the one-shot form available without weakening the host-header safety contract.