Skip to main content

warn_on_insecure_http

Function warn_on_insecure_http 

Source
pub fn warn_on_insecure_http(url: &Url, api_key: &str)
Expand description

Emit a warning if the parsed url uses plaintext HTTP against a non-local host while an API key is configured, because the API key would be sent unencrypted.

Loopback hosts (127.0.0.1, ::1, localhost) are exempt because they never leave the machine.