Function http_to_https_handler

Source
pub async fn http_to_https_handler(
    stream: impl Read + Write + Send + Unpin + 'static,
    config: &'static Config,
)
Expand description

A handler that redirects incoming requests to their original URL, but with the HTTPS scheme instead.

ยงWarning

This function does not know the original URL scheme. If used as the handler for HTTPS requests, this might create a redirect loop.